Re: Computer version of Risk
- Posted by Michael Packard <lgp at EXO.COM> Jul 02, 1997
- 803 views
On Tue, 1 Jul 1997, Joseph Martin wrote: > > > The AI should be pretty straightforward. > > Hope so. I'm new to AI. > All AI programming is centered around 2 concepts: 1) What does the computer player know 2) What does he do about what he knows If you ask 5 risk players how to play, you'll get at least 6 "optimal" strategies. Some players like to spread out all over the globe and consume their opponents from all sides. Some like to consolodate as much of their armies as possible in one continent, then slowly expand their borders. Every player has his own agenda, his own master plan he devises before the game begins, based on experience in previous games. Your computer opponents should also have their own pet strategies that they follow as often as possible. The "best" way to create computer AI is to make the game playable by human players, then play about 20 games with human players and have the computer keep track of every move of every player. You then can "teach" the computer to play like you do. You need the test data to help you narrow down when the computer needs to make which decision. Teaching a program to play it actually pretty fun most of the time. It takes HOURS, but it's fun when it does what you predict it to do. When you play your test games, take careful notes about what you do when, what factors are you considering when you decide what to do. The computer player needs to do the same consideration when it needs to decide what to do. You might have something like "when I have less than 3 armies in a territory and I have 5 or more I can move into that territory, I move 1-3 into it" You make a decision list of those kinds of things, then prioritize them. Each different computer player will have a different decision list with different priorities. Perhaps one player must take Irktusk at all costs, perhaps another wants to secure north america first, then asia... or whatever. Once you get the computer AI playing, you need to play balance the players. Computer players following a strict script will generally kick a human player's butt every time. If all the pacman ghosts know where you are and always take the most direct route from where they are to where you are, you are caught quickly, no matter how well you play. The game isn't fun anymore. You need to make the AI characters do something other than what is in their best interest sometimes. It makes the players less predictable. You can tell basically what they are after and their overall strategy, but not necessarily what they are going to do on any particular turn. Sometimes doing the most direct thing is hazardous to the AI player. In OidZone, the swarm mines hunt you down, changing direction every once in awhile to intercept you. If I did the course correct every frame, they go right for you and line up single file along the most direct course. This makes them easy pickings for you. You spin around and start shooting and you'll get them all. Too easy. If I course correct every 5-10 frames instead and give them a choice of 3 general directions towards you, they swarm around you then close in for the kill. Makes the game much more challenging. The longer the time between course correction, the larger the swarm cloud around you. If and when I get around to it, the next Crash Course lesson will be about AI programming. Michael Packard Lord Generic Productions lgp at exo.com http://exo.com/~lgp A Crash Course in Game Design and Production http://exo.com/~lgp/euphoria