Poker-AI.org
http://poker-ai.org/phpbb/

On Which type of structure do you store your game tree ?
http://poker-ai.org/phpbb/viewtopic.php?f=24&t=2606
Page 1 of 1

Author:  MrNice [ Fri Oct 04, 2013 10:56 am ]
Post subject:  On Which type of structure do you store your game tree ?

Hi Guyz,

I just wondering on which type of structure do you store you gametree when you are using it ? vector, list, ?

I'm working with obecjts that have pointers to the 2 or 3 next nodes and 1 pointer to the previous node...

Regards,

MrNice

Author:  spears [ Fri Oct 04, 2013 12:16 pm ]
Post subject:  Re: On Which type of structure do you store your game tree ?

- Don't use vectors or lists as they generally quite slow.
- Use arrays instead.
- http://www.poker-ai.org/archive/www.pok ... ml?p=39384

Author:  MrNice [ Mon Nov 04, 2013 6:37 pm ]
Post subject:  Re: On Which type of structure do you store your game tree ?

Hi Spears,

Thanks for your input.

Right now I see why I have to work with array :D

Just to save pointer on a data file it's a bit tricky :D

Author:  Nose [ Tue Nov 05, 2013 12:59 am ]
Post subject:  Re: On Which type of structure do you store your game tree ?

MrNice wrote:
Hi Guyz,

I just wondering on which type of structure do you store you gametree when you are using it ? vector, list, ?

I'm working with obecjts that have pointers to the 2 or 3 next nodes and 1 pointer to the previous node...

Regards,

MrNice


I am using the same approach. Each node-object keeps track of all of its childnodes in an array of pointers.
Just for curiosity: Why do you need the pointers to the parents?

Edit: To store the strategy I create two files: one index file containing the offsets to the frequencies of each node in the second (the actual strategy) file. Obviously you then need node-IDs for addressing the offsets in the index file.

Author:  MrNice [ Thu Nov 14, 2013 1:42 pm ]
Post subject:  Re: On Which type of structure do you store your game tree ?

Hi Nose,


I'm using a pointer to the parent during the game tree creation phase...

MrNice

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/