Re: Logically coding logical AI's that do logical things?

Finite State Machines are commonly used, which are essentially decision tree's. If player within X spaces, moves towards player, if player has garlic move away from player, etc. Random number generators in this case can be really good for building more personality into your AI, like rolling a number between 1 to 10 every few seconds or so, if below 5 approach the player, if above stop moving, etc.

On the more technical aspects of navigation and targetting, you would need a pathfinding algorithm like A Star or something similar, aiming in terms of rotation would involving taking the position of the enemy and the position of the player and rotating in the given direction towards the player. Same thing with dodging or blocking, if the player attacks the AI registers the action and chooses a given reaction, possibly with random number generation. If dodge move X to try and avoid attack, if block, well, block.

Learning AI's within games are also possible based on retained variables, some being referred to as [Genetic Algorithms], seeing as they learn through a process of natural selection. There's actually an interesting game called [Echo] where each room is filled with clones of the player. Every action the player takes "updates" these clones so they can do the same next round, so if you run around jumping mad and shoot them all, next time they'll do the same to you. Crawl through the next map as a total pacifist, they will too next round. This mechanic allows the player to set the difficulty of their opponents each round through their actions, you could get up and blow past the crawling pacifists this round, but expect them to rush you the next as a result.

There's also a Total Beginners Guide to AI article [here], not likely the same as the book nolan mentioned but may still be worth a read.

-- 
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : redfox via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : nolan via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : magurp244 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : Munawar via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : dardar via Audiogames-reflector

Reply via email to