Game design : Making computer play
Carl G.
cginnowzerozeroone at microprizes.com
Mon Apr 14 17:28:18 EDT 2008
"Marc 'BlackJack' Rintsch" <bj_666 at gmx.net> wrote in message
news:66gf8dF2ju94lU3 at mid.uni-berlin.de...
> On Mon, 14 Apr 2008 00:13:56 -0700, v4vijayakumar wrote:
>
>> In computer based, two player, board games, how to make computer play?
>> Are there any formal ways to _teach_ computer, to choose best possible
>> move?
>
> That depends on the type of the game. For a certain class of games one
> can use the `minimax method`_ for instance.
>
> .. _minimax method: http://en.wikipedia.org/wiki/Minimax
While checking the Wikipedia, also check out the A* (a-star) graph search
algorithms:
http://en.wikipedia.org/wiki/A%2A
There is a table on the top-right of this page that includes other graph
search algorithms.
My AI games are usually built around general purpose mini-max code, possibly
inplementing A* (I reuse the same code for various games). For each new
two-player game, I usually only have to write new "position evaluator" code,
which generates a quantitative value that gives the relative position of one
player over the other for a particular board. Some games can benefit from a
database of opening moves that have been shown to be be superior (this
speeds up the computer's response).
Carl G.
More information about the Python-list
mailing list