minustehbare / CSE4705_final

Game of the Amazons AI for final project.
2 stars 0 forks source link

ClientMove::_value #9

Closed searing closed 13 years ago

searing commented 13 years ago

Are we sure we want to store the value here? It seems like you'd want to sort ClientMove objects by their value, in which case you'd store the value separately, and use something like a SortedMap (TreeMap) to map values to moves.

minustehbare commented 13 years ago

Steve had created a Move class within the EndGame package, and I merely merged the ClientMove and Move classes so that his code wouldn't break. I'd ask him about the _value attribute.

Sorry I couldn't help more, -Tom

On Fri, Apr 29, 2011 at 7:27 PM, searing < reply@reply.github.com>wrote:

Are we sure we want to store the value here? It seems like you'd want to sort ClientMove objects by their value, in which case you'd store the value separately, and use something like a SortedMap (TreeMap) to map values to moves.

Reply to this email directly or view it on GitHub: https://github.com/minustehbare/CSE4705_final/issues/9

Dr-Steve commented 13 years ago

I use the value in the alpha beta search. The search is constantly comparing one move against one other move, so it didn't really make sense to have a sorted map, there is no need for sorting and it would be wasteful to store and pull back moves in this case. For something like the AI portion of it where you are checking a bunch of values the map may make sense, but in my case I saw the value as an attribute of the move, so I thought it made sense to store it there.