For Programmers: Free Programming Magazines  


Home > Archive > Prolog > October 2006 > AlphaBeta issue









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author AlphaBeta issue
Pedro Pinto

2006-10-19, 6:59 pm

I there! I have an assingment on my college that is to write an
evaluation function based on the current state of the game and pass a
number value to the alphabeta function. The game is the "Pawn game" in
an 8x8 dimension board.

As an example our teacher game us two example functions.

One in mr_random, that only returns, in any state, a random value.

The other is mr_random_plus, that in case of victory send 100, defeat
-100, tie 0 and on other states a random number.

In fact the mr_random_plus is smarter that mr_random! I've tested by
playing against them.

Our assingment is to write an evaluation function, that based on the
current state of the game, sends a value to the alphabeta algorithm.

My problem is, i've tried to send always the same number, like "5", but
i still cannot predict what will the computer move be. He always has a
diferent move, even if i put him starting the game (With an equal state
every beginning of the game, it should play the same move).

Can somebody explain to me how the number sent influences the alphabeta
decision?

Thanks in advance.

Markus Triska

2006-10-19, 6:59 pm

"Pedro Pinto" <kubic62@gmail.com> writes:

> i still cannot predict what will the computer move be.


Probably ties are broken randomly (choose any move among those having
the highest value). With unique values, results should be predictable.

Best wishes!
Markus Triska
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com