Author |
Topic: Data Structure for storing possible move generated (Read 3003 times) |
|
adityajoshi
Forum Newbie
Arimaa player #9595
Gender:
Posts: 1
|
|
Data Structure for storing possible move generated
« on: Nov 12th, 2014, 11:34am » |
Quote 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:
Posts: 119
|
|
Re: Data Structure for storing possible move gener
« Reply #1 on: Nov 12th, 2014, 8:11pm » |
Quote Modify
|
If you are using C++, I use an std::vector.
|
|
IP Logged |
|
|
|
half_integer
Forum Guru
Arimaa player #8819
Gender:
Posts: 104
|
|
Re: Data Structure for storing possible move gener
« Reply #2 on: Nov 16th, 2014, 8:21pm » |
Quote 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 |
|
|
|
|