| |||||||||||||||
| |||||||||||||||
|
|||||||||||||||
|
I originally saw this game in the form of a puzzle in Trilobyte's multimedia game The 7th Guest. The rules are very simple, the AI relatively simple to create, but the game can pretty challenging to play against. This makes the game an excellent project for gaming AI beginners. OutlineThe rules of the virus game are as follows:
The animation above and diagram below demonstrates the rules. In Figure 1 you see that the green piece moves from the bottom-left hand corner and reproduces into the space above and to the right. It then takes the surrounding four blue pieces. In Figure 2, the blue piece in the bottom right hand corner jumps two places into the "centre" of the 4-piece green structure and takes them all. Note how the two space jump doesn't have to be perfectly straight.
GuidelinesConsider using an influence map to assess the various positions on the board. Some possible heuristics:
Probably these heuristics would be sufficient to create decent AI. Note that there is a certain degree of added complexity, since the rules of the game requires both a start and end point to the move (as opposed to games like Tic-tac-toe, where placing is independent to existing pieces). As such, you may want to consider limiting your influence map to positions that are within reach of your existing pieces. Run the heuristics to find the optimum position, then search for the best piece to make the move—obviously, a one-space move is preferable to a two-space jump. You could also look at creating a simple finite state machine that controls the aggressive/defensive weights applied by the influence map. One state when the AI owns less than 50% of the board, and another when it owns more. Solutions
Last Updated: 27/12/2004 Article content copyright © James Matthews, 2004.
|
|
||||||||||||||
All content copyright © 1998-2007, Generation5 unless otherwise noted.
- Privacy Policy - Legal - Terms of Use -