Tag Archive for 'AI'

Progress Report 2007-11-01

3 Steps Closer:

Step by step ooh baby

Step 1: Stop working at Air Liquide Canada as a Web Developer. (Hrm I mean .. We can have lots of fun)

Step 2: Go back to School. Start University. (Hmm.. Theres so much we can do)

Step 3: Get a part time job in the industry as a Game Tester. (Its just you and me)

That’s right folks, I’m 3 steps closer to completing my Not-So-Secret Master Plan! Thanks to frob for helping me update my resume! It really helped with Step 3. Thanks man!

And sorry for the blog hiatus but I was taking my time to adapt to my new student life, and now, balancing my time between university and job.

Changes:

  • HexEngine: Added on_after_event to layers events.
  • HexEngine: Added tile events using a feature currently in the trunk of Tiled
  • HexEngine: Added on_load and on_unload as supported map properties. The value is a Script to be executed.
  • Secret Prophecy: Sprites Animations
  • Secret Prophecy: Character movements with movement animations.
  • Secret Prophecy: Basic AI for random NPC movement.
  • Secret Prophecy: Basic wandering AI within a rectangular zone.
  • Secret Prophecy: Basic AI following a predefined path.

Challenge 200:

For this progress report : 30h
YTD : 138h / 200h

TetriQuest 1.0 Post-mortem

Most of my personal projects are started because I ask myself way to many questions. When creating TetriQuest, I wanted to know:

  1. Is HexEngine ready to create a simple game?
  2. Is it easy or hard to create an AI for Tetris?
  3. Could RPG-like element be implemented in the gameplay of Tetris?

And I couldn’t be happier because, with TQ 1.0, I was able to answer all those questions. Here’s a small post-mortem of what went well and what didn’t

The Good

Development was Rewarding

There is not a feature in this game that was not rewarding to develop. Having a working Tetris clone in a short period of time with my homebrew engine was great. And when I saw my AI being able to do 10000+ lines on average, I was ecstatic!

A New Found Passion

I was already intrigued by AIs and creating my own was so much fun that I started reading AI for Game Developer. I’m looking forward working on more complex AIs!

The Bad

A well defined milestone only mid-project

Version 1.0 is not all that I had in mind for TetriQuest and not having a well defined milestone led to some “oh shinny!” moments. I rectified the situation mid-project to bring it back on track.

Moving On

With 1.0 completed, I can put TQ aside for some time and get working on HexEngine and on the-secret-but-not-so-secret project codenamed Secret Prophecy.

Progress Report 2007-09-01

Changes:

  • TetriQuest: AI thinking now doesn’t stop the drawing and updating of the game. Gives a more fluid experience. \o/
  • TetriQuest: If anyone clear more than 1 lines, it adds line cleared – 1 lines to each opponent field.
  • TetriQuest: The AI settings were already modifialbe globaly, but now each board have an AI config of it’s own. Allowing different AI setting in the same match.
  • TetriQuest: For each line you clear, mana is added to to the field.
  • TetriQuest: Mana: You collect mana by clearing lines with mana in it.
  • TetriQuest: Magics use mana.
  • TetriQuest: You can’t cast magic if you don’t have enough mana.
  • TetriQuest: Bug Fix: AI keeps it’s setting after it’s dead.

Challenge 200:
For this progress report : 20h
YTD : 108h / 200h

Todo:

  • J.I.M. : Do not allow an object to be push into another object.
  • Fix gif transparency.
  • Pixel perfect collision detection.
  • Rework the split of a tileset image. I should copy the pixel of the big image in the tile, instead of each time copying the big image and cropping it.

Progress Report 2007-07-01

Changes:

  • Renamed Nameless-Tetris-Clone to TetriQuest.
  • A working AI for TetriQuest. It can do on average 10000 lines per game. \o/ I think that’s a fairly impressive start.

Dev Notes:

Okay doing a working AI for Tetris was not as hard as I thought it would be. But doing one that is good involves sooo much more testing and debuging than I thought hehe.

You might be asking how I could create a fairly solid AI for Tetris. Surely I had to use some complexe neural network AI technique. Nope! I loop all possible moves (x position and rotation) and use this simple formula:

score for this move = (edge weigth * number of edge touching the map)
+ (cleared line weigth * number of cleared lines)
- (height weigth * positive delta of the height before and after the move)
- (shadowed holes weigth * number of shadowed holes)

The AI then use the move with the highest score.

Mojo:

You should have seen me the day I finally ironned out all the little bugs that was preventing my AI to play. I was throwing my arms in the air shouting “I did it!”, laughing and dancing, happy and proud. That feeling is well worth all those late debuging night ^_^

Challenge 200:
For this progress report : 13h
YTD : 80h00 / 200h

Todo:

  • TetriQuest: Player vs Multiple AI.
  • TetriQuest: Magics (i.e.: Tetrinet like special box).
  • TetriQuest: AI react to magic attacks.
  • J.I.M. : Do not allow an object to be push into another object.
  • Fix gif transparency.
  • Pixel perfect collision detection.
  • Rework the split of a tileset image. I should copy the pixel of the big image in the tile, instead of each time copying the big image and cropping it.