Best AI You’ve Ever Created?

For my zombie game Dead Wake, I resorted to do a pretty simple AI: the zombies just go towards the player. Years earlie, when I was doing Hightailed puzzle game, developing the AI was much much trickier. First there was easy AI, which basically moved the monsters in random directions. Then there was medium AI, which “had a clue on what to do, but sometimes made bad moves”. Then there was AI that always tried to do good moves. Well, doing “good moves” was pretty hard since there was several creatures on board and they sort of needed to “collaboratively” maneuver the one guy. I managed to do a decent AI, something I was happy with.

But these didn’t match for the best AI I’ve created.

I was around 15 (I probably wasn’t but whenever I think times before turning 20, I always say 15) when I heard about those intelligent chat systems and of course I had to create my own. It was bloody stupid program where user chats with a computer, but if you happened to write the right questions that I had programmed the system to understand (I did this by just starting typing & asking something from my program, and then taking notes on what I was typing). My lil brother was the tester. I don’t recall exactly what he said but if I’d need to bet, I would think he would probably have wanted to send the chat program to gates of hell so when new arrivals come, they could have painfully tested my program.


I liked doing that AI. I even managed to make it to exchange 2-3 meaningful sentences. I’m not sure if the chat program actually remembered what you had said, but I feel it either did or I had plans for doing that. Anyway, it was a bloody big list of IFs in that program.

Sort of stupidly cool back then, and thinking the same now too.

What’s your greatest AI invention. Care to share?

Juuso Hietalahti


  1. I did a Genetic Algorithm test ground using the old C graphics – inspired from a discovery channel show. A sheepdog and a sheep problem. The sheep was programmed to randomly move(which i later learnt was always the “same random” and changed to time seed) and the sheepdog was to push this sheep to the top left corner of the screen in minimum number of moves. The genotype (32 bits) controlled how this sheepdog behaved ( like its maximum eyesight, speed, how it moved etc) The sheepdog started with some 800 moves or so in the beginning and came down to 32 moves after 300 generations. Dont know if this can be called AI.

  2. Integer man: that sounded fun! It indeed is fun to see AI doing something unexpected… and especially evolving into something. Very cool.

  3. I made some “smart” AI that lets creatures in my game follow the main character inside the maze.
    If there was a straight line between the character and creature, it would walk straight. And if there wasn’t, the creature could follow the trail of the character up to a certain trail length.

  4. An A-Life simulation / game template I did for my Masters degree. Nothing special, though, mostly the stuff you get in basic RTS titles, neatly organized so that it could be expanded later, just like the rest of the project.

    Having little time due to fulltime work as 3d artist and having no prior experience of making AI projects of such scale, I wouldn’t be able to do it without help and tips from the team AI programmer.
    Oh, those were the days.

  5. Not a game AI, but I was experimenting with neural nets and genetic algorithms back in high school.

    I wrote a 12 x 12 tile world with a dog, an acorn, a squirrel, a rabbit, and a tree.

    I coded in rules so that:
    – The dog can eat the rabbit
    – The dog can eat the squirrel
    – The squirrel can pick up the acorn
    – The rabbit and the squirrel cannot enter each other’s tiles
    – Only the squirrel can enter the tree
    – If the squirrel entered the tree after it had collected the acorn, the simulation would end
    – The simulation ends if the squirrel is eaten by the dog
    – The simulation will end after X turns if no other conditions are met

    The objective was to see if I could code a scenario involving neural nets and genetic algorithms to see if the system could evolve a squirrel that could get the acorn and get to the tree without getting eaten by the dog.

    Each actor was controlled by a neural net with 9 possible outputs (representing staying put or moving in a cardinal direction) and inputs for each of these choices indicating what objects were present in the tile and how close the tile was to a particular object (i.e, how much it smelled of that object).

    The rabbit was given a hardcoded neural net that made it always move in a random direction and never sit still.

    The dog was given a hardcoded neural net that made it sit still unless it saw something it could eat next to it, in which case it would choose that tile (resulting in killing it).

    Each member of the population of squirrels started with randomized weights and the ones that scored the best persisted and were used as a basis for future squirrels. Only one squirrel ran the simulation at a time.

    Scoring was done based on how long the squirrel stayed alive with bonus points for getting the acorn, bonus points for winning, and a penalty for being eaten.

    Was very interesting to see the squirrels evolve to things that could find the acorn, then to things that could do so while avoiding the dog, then to things that could find the tree afterward.

    The best part of all of it was tweaking the fitness function so that the squirrel was hugely rewarded if the rabbit happened to die. The simulation evolved a squirrel that would pursue the rabbit but still avoid the dog. The squirrel would stay on the opposite side of the dog but remain next to the rabbit and eliminate a tile choice from the rabbit’s random brain. Eventually the rabbit would wander into the dog’s area of control, the dog would eat the rabbit, and the squirrel would then sprint off, grab the acorn, and go to its tree. I hadn’t thought of how that could work, but the algorithm figured it out for me in the form of a herding squirrel.

Comments are closed.