Game Development Reference
In-Depth Information
Figure 4.10
There are four safe moves that the AI does not see.
implementation of a rule-based AI is inherently adjustable. One of the advan-
tages to a rule-based system is that it gives an intuitive way for the AI pro-
grammer to adjust the degree of difficulty.
There are a few simple rules that could be added to finish the game. If the number
of mines left hits zero, then the AI should click all remaining squares. If the
number of moves equals the number of mines, the AI should flag every
remaining square. The need for these rules did not make an appearance until the
AI was well on its way to finishing off most games. We watched it play and
noticed an area for improvement.
This illustrates one of the advantages of the method: Working with the rules
makes it easier to add new rules. We can evolve the AI by seeing a need and then
adding a new rule to cover it. We do not have to implement every good idea we
come up with at the very start because we can test as soon as we have one rule. If
the AI proves sufficient with a few simple rules, the programmer does not need to
risk investing time in more complex ones.
Search Nedrilad ::

Custom Search