Arimaa Forum (http://arimaa.com/arimaa/forum/cgi/YaBB.cgi)
Arimaa >> Bot Development >> End game move generator
(Message started by: maker on Nov 6th, 2004, 2:05pm)

Title: End game move generator
Post by maker on Nov 6th, 2004, 2:05pm
Hey,

  From what I've seen of the 'every possible move generator' script written in perl, it seems like it would be easy to modify it to simply generate all possible moves involving a rabbit advanced enough to(possibly) make a goal.  What I mean to say is really a question so, "Does anyone know how to modify that script to simply return all possible wins by the current player in the current game position?"  If so( and I know this is unlikely, but, I'm still going to ask,) would said person slightly modify it and make it available to us?

  I had tried to check for end-game states in c++ but found the function to be growing in complexity no matter which approach I took.  Anyway, just trying to save some coding time for my AI project.  Of course I wouldn't even think of ripping your work(plaigerizing) without giving credit to the author and the website(for making it available.)  Anyway, if anyone understands perl better than I and thinks this would take just a few minutes, I would very much appreciate it.

maker

Title: Re: End game move generator
Post by maker on Nov 6th, 2004, 2:10pm

Quote:
I had tried to check for end-game states in c++ but found the function to be growing in complexity no matter which approach I took.


Approaches mentioned are these:
  actually moving pieces on a fake gameboard to see if a certain rabbit could get to a goal state

--this next approach seemed less and less possible, the closer to a goal state I became(ie the third or second ranks from winning.)--
  simply checking if the rabbit could get to a goal state without moving any pieces

Title: Re: End game move generator
Post by omar on Nov 6th, 2004, 4:11pm
I wouldn't suggest doing this in Perl for any serious project. It would run way too slow.

The sample bot contributed by Don Dailey is probably a better place to start. In fact it already has this checking and runs a lot faster than Perl.

Title: Re: End game move generator
Post by maker on Nov 7th, 2004, 10:50pm
Oh.  Well,  :-[ I just don't understand Mr. Don's code.  You see, I'm just a newbie at coding bots and I've never seen such c code before.  Bit arrays and this whole ^ operator are completely foreign concepts to me.  I didn't look any further at his code because I'm not fool enough to believe that I can understand the higher functions of his code without understanding the lower ones.  If the documentation were more explicative, I might be able to understand it from a top-down type of approach, but it doesn't explain enough for a wet-behind-the-ears bot developer, at least not for this one.  Didn't mean to be bashing on his code, it looks like great code, I just don't understand it.  Thanks for your time to reply, oh, and in case you're wondering, I wasn't going to use perl in my bot, just in the learning funciton of the bot, though I don't really want that running too slowly either.  I guess I'll just finish writing my own goal function.  Thanks for your time.

maker

Title: Re: End game move generator
Post by fotland on Nov 8th, 2004, 10:16am
Bomb has a separate move generator for goal threats, but it generates more than just rabbit moves.  It generates any move that is close enough to the rabbit to affect the outcome.



Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.