Results 1 to 8 of 8
 11042009, 02:38 PM #1Member
 Join Date
 Nov 2008
 Posts
 67
 Rep Power
 0
Creating the evaluation function for Minimax
For a game I am making, I want to use the Minimax algorithm to program the AI. The 2 players have 2 different evaluation options (because the way player1 and player2 win are different).
Can player1's evaluation function return values from 110, while player2 returns from 120? Or will this mess up the Minimax algorithm? Basically, my question is: Do the 2 evaluation functions have to be on the same scale (so a 5 in one is the same as a 5 in the other)?
 11042009, 04:32 PM #2Member
 Join Date
 Oct 2009
 Posts
 12
 Rep Power
 0
Im not quite sure I understand Minimax exactly, but from looking at it I assume that they could return different values as long as you then compare the outputs to seperate winning conditions for each player
 11042009, 04:54 PM #3
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 14,389
 Blog Entries
 7
 Rep Power
 25
If you strictly use one evaluation function for the even levels and the other one for the odd levels it doesn't matter whether or not they return values from different ranges.
kind regards,
Jos
 11042009, 11:51 PM #4Member
 Join Date
 Nov 2009
 Posts
 23
 Rep Power
 0
I'm not 100% certain, but I really think you might run into problems by having a different set of evaluation values for White and Black. One of the key aspects of minimax algorithm is that you need a consistent way of determining whether a position favors White or Black. I don't see how you can do that when you return a different set of values for each. How are you gonna compare the values? I'm nt saying it can't be done, just that It's not clear to me that you understand the key concept of deciding who is better.
That being said JosAH says no problem. So maybe he knows something I don't. So Jos, how do you respond to my point?
regards.
 11052009, 08:38 AM #5
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 14,389
 Blog Entries
 7
 Rep Power
 25
If the 'other' evaluation function is a linear combination of the 'first' evaluation function (that's what I understood from the OP), i.e. E2(x) == a*E1(x)+b it doesn't matter whether or not you use E2 of E1, otherwise if E2(x) is completely different from E1(x) a different move can/will be selected. Both evaluation functions aim at a best move for a player so the combination E1 and E2 will behave as reasonable as both evaluation functions are.
kind regards,
Jos
 11052009, 04:09 PM #6Member
 Join Date
 Nov 2009
 Posts
 23
 Rep Power
 0
OK fine, I guess I can see how that would work, although it seems to me that if one eval function was a linear combination of the other, then it we should just as easily be able to do the combining ( or scaling) of the values within a single eval function, so that it returns a consistent set of values for both sides. That shouldn't be hard, since we should easily be able to pass (side to move to the single eval function)
 11052009, 04:15 PM #7
 Join Date
 Sep 2008
 Location
 Voorschoten, the Netherlands
 Posts
 14,389
 Blog Entries
 7
 Rep Power
 25
 11052009, 04:29 PM #8Member
 Join Date
 Nov 2009
 Posts
 23
 Rep Power
 0
Similar Threads

[SOLVED] Boolean Expression Evaluation Framework
By priyanka.dandekar in forum Advanced JavaReplies: 8Last Post: 03272010, 03:35 PM 
Creating files stopped creating...
By Dieter in forum Advanced JavaReplies: 3Last Post: 09252009, 11:45 PM 
building a complete online evaluation system
By pmminov in forum JavaServer Faces (JSF)Replies: 0Last Post: 04072009, 09:04 PM 
Postfix Evaluation using a Stack, Help?
By dalangley in forum New To JavaReplies: 2Last Post: 02162009, 11:43 PM 
help creating two classes that function together
By sinreaver in forum New To JavaReplies: 6Last Post: 10012008, 03:44 AM
Bookmarks