Welcome, Guest. Please Login or Register.
Apr 18th, 2024, 9:28pm

Home Home Help Help Search Search Members Members Login Login Register Register
Arimaa Forum « Data Structure for storing possible move generated »


   Arimaa Forum
   Arimaa
   Bot Development
(Moderator: supersamu)
   Data Structure for storing possible move generated
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Data Structure for storing possible move generated  (Read 2955 times)
adityajoshi
Forum Newbie
*



Arimaa player #9595

   


Gender: male
Posts: 1
Data Structure for storing possible move generated
« on: Nov 12th, 2014, 11:34am »
Quote Quote Modify Modify

Hi all!! I am an amateur Arimaa bot developer.I am trying to implement a basic Arimaa bot using bit-boards.The problem I am facing is that i am not able to find a suitable data structure for storing all possible moves from given board position(which are needed to implement move search like alpha beta algorithm). Can anyone suggest suitable data structures ?
IP Logged
nbarriga
Forum Guru
*****



Almost retired Bot Developer

   


Gender: male
Posts: 119
Re: Data Structure for storing possible move gener
« Reply #1 on: Nov 12th, 2014, 8:11pm »
Quote Quote Modify Modify

If you are using C++, I use an std::vector.
 
IP Logged
half_integer
Forum Guru
*****



Arimaa player #8819

   


Gender: male
Posts: 104
Re: Data Structure for storing possible move gener
« Reply #2 on: Nov 16th, 2014, 8:21pm »
Quote Quote Modify Modify

I am also using a vector of Move objects, actually an array of four vectors, one each for Moves with 1-4 steps.  I pre-size the vectors to avoid most occurrences of resizing.
 
Moves are simply an array of Steps.  Steps are a few ints which encode the expected things like origin square, move type, and piece being moved.
 
A Move has a maximum of 4 Steps if you don't record the captures, and 8 Steps if you do.
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

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