[MUD-Dev] Better Combat (long)

Kwon J. Ekstrom justice at softhome.net
Wed Aug 11 03:37:08 CEST 2004


Byron Ellacott wrote:
> David Kennerly wrote:

>> knowledge base of known vertices with known values.  I'd love to
>> hear from a chess programmer or a self-conscious chess player
>> about the internals of either intelligence.  How do chess
>> programs think?  How do chess players think?

> The game can be seen as an n-ary tree of legal moves leading to
> new board states.  It's an infinite tree, since there are legal
> moves that can loop states.  From any given state S, you do a
> breadth first style search down at most M moves, applying a
> function to rate each state's desirability.  The path that leads
> to the maximum final desirability indicates the next move to take.

Every node in the decision tree can be considered a board state. The
board state is then analysed and rated for each player amung
multiple axis... position, material, ect.

The comparison is min/max... what's best for me and worst for my
opponent where "me" is the player whose turn it is at that node.
(you have to assume the opponent will choose their best move)

The search algorithm is similar to that of an A*.  The primary
difference is that you select the top n nodes to create a broader
tree.

A BFS is good for the first 3-4 moves to prevent simple short term
tactics because they initially look weak.

If the opponent makes an unexpected move then you simply search from
that state.

> The apparent skill of the AI is thus determined by how many moves
> you are willing to look ahead, and how effective your desirability
> function is.  Most consumer grade chess programs use the
> difficulty setting to determine how far ahead they look.

This can be handled in 2 ways.

  1. You can each for each axis individually.

  2. You can constrain the search with time or iterations

> (I heard it said that human players work in the same way, but are
> able to take advantage of the human brain's parallelism to perform
> the job. And human players who beat the greatest chess machines do
> it by thinking more moves ahead than it can, and trapping it.)

The computer's advantage is in the quantity of moves that it can
examine. A good chess player's advantage is the ability to minimize
the number of moves examined, and the ability to modify strategy
based on conditions.

There are alot of patterns that reoccur in chess, once you learn to
recognise them, they can be reused.  When I played chess regularly,
I used to study tactics and chess problems.  These are designed to
build on this.

vs a superior player, I try to play a closed and defensive game, to
wear them out mentally. Against a good player, its a closed and
aggressive game.  And against a computer or weaker player, I will
work at trading pieces to clear off the board.

This is because a weaker player is less likely to know how to use
their pieces effectively, and a computer has less of an advantage
when there are fewer possible moves.

-- Kwon J. Ekstrom
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list