monte carlo tree search question

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

elcabesa
Posts: 855
Joined: Sun May 23, 2010 1:32 pm

monte carlo tree search question

Post by elcabesa »

I started reading something about MCTS and I'm asking myself how it's possible to implement it.

I'm used to negamax recursive implementation where you don't explicitly create the tree in memory but you traverse the tree without allocating it.
Is this possibile with montecarlo? or a montecarlo simply create a bit tree in memory and you have to store it?

the fist examples I have found create a tree in ram.

thank you.
AlvaroBegue
Posts: 931
Joined: Tue Mar 09, 2010 3:46 pm
Location: New York
Full name: Álvaro Begué (RuyDos)

Re: monte carlo tree search question

Post by AlvaroBegue »

Yes, in Monte Carlo Tree Search you need to store the tree in memory. Just to be clear, the random playouts that go from the leaves to the end of the game don't need to be kept in memory.
elcabesa
Posts: 855
Joined: Sun May 23, 2010 1:32 pm

Re: monte carlo tree search question

Post by elcabesa »

yes, I understood this.

I have seen that an attempt of creating a monte carlo chess engine has been done in a thesis called MCC, derived from stockfish. it's still possibile to find it? Unofrunately I wasn't able to found the sources.
User avatar
Ajedrecista
Posts: 1968
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Monte Carlo tree search question.

Post by Ajedrecista »

Hello Marco:
elcabesa wrote:yes, I understood this.

I have seen that an attempt of creating a monte carlo chess engine has been done in a thesis called MCC, derived from stockfish. it's still possibile to find it? Unofrunately I wasn't able to found the sources.
I guess that you know about this paper of MCC:

Monte Carlo Chess

This paper contains brief pieces of code.

Regards from Spain.

Ajedrecista.
elcabesa
Posts: 855
Joined: Sun May 23, 2010 1:32 pm

Re: Monte Carlo tree search question.

Post by elcabesa »

Yes I know about it. I want to know whether the full source code is available. I like to read code.
Daniel Shawul
Posts: 4185
Joined: Tue Mar 14, 2006 11:34 am
Location: Ethiopia

Re: Monte Carlo tree search question.

Post by Daniel Shawul »

yes, I understood this.
elcabesa wrote:Yes I know about it. I want to know whether the full source code is available. I like to read code.
Why the hell would you want code when you can think/understand the algorithm for yourself? Do you think you can add some quick ELOs to your little chess engine with MCTS? The only reason you are even considering this now is probably because something other than alpha-beta have become a hot-topic. Well the answer is NO ... especially if your attitude is just for the Stockfish's version of MCTS. Are you interested in an 2200+ chess engine that plays chess and other variants with MCTS ? It is available for download here but no source code. https://sites.google.com/site/dshawul/home
User avatar
velmarin
Posts: 1600
Joined: Mon Feb 21, 2011 9:48 am

Re: Monte Carlo tree search question.

Post by velmarin »

Ivanhoe has that option, and the code.
elcabesa
Posts: 855
Joined: Sun May 23, 2010 1:32 pm

Re: Monte Carlo tree search question.

Post by elcabesa »

Daniel Shawul wrote:
yes, I understood this.
elcabesa wrote:Yes I know about it. I want to know whether the full source code is available. I like to read code.
Why the hell would you want code when you can think/understand the algorithm for yourself? Do you think you can add some quick ELOs to your little chess engine with MCTS? The only reason you are even considering this now is probably because something other than alpha-beta have become a hot-topic. Well the answer is NO ... especially if your attitude is just for the Stockfish's version of MCTS. Are you interested in an 2200+ chess engine that plays chess and other variants with MCTS ? It is available for download here but no source code. https://sites.google.com/site/dshawul/home
Thank you for your polite and gentle reply.
I'd like to view the code since I already had the paper and because I think it's easier to fully underStand an algorithm if I can read a code too.
Thank you very much, it's a pleasure to speak with a so gentle person
Roger Brown
Posts: 782
Joined: Wed Mar 08, 2006 9:22 pm

Re: Monte Carlo tree search question.

Post by Roger Brown »

elcabesa wrote:
Daniel Shawul wrote:
yes, I understood this.
elcabesa wrote:Yes I know about it. I want to know whether the full source code is available. I like to read code.
Why the hell would you want code when you can think/understand the algorithm for yourself? Do you think you can add some quick ELOs to your little chess engine with MCTS? The only reason you are even considering this now is probably because something other than alpha-beta have become a hot-topic. Well the answer is NO ... especially if your attitude is just for the Stockfish's version of MCTS. Are you interested in an 2200+ chess engine that plays chess and other variants with MCTS ? It is available for download here but no source code. https://sites.google.com/site/dshawul/home
Thank you for your polite and gentle reply.
I'd like to view the code since I already had the paper and because I think it's easier to fully underStand an algorithm if I can read a code too.
Thank you very much, it's a pleasure to speak with a so gentle person
Hello Marco,

Pure class.

Please continue in like vein.

Later.
smatovic
Posts: 2645
Joined: Wed Mar 10, 2010 10:18 pm
Location: Hamburg, Germany
Full name: Srdja Matovic

Re: monte carlo tree search question

Post by smatovic »

a simple mcts implementation does not need to store the whole tree in memory, just the first ply with win/loss counters....afaik in GO mcts they use the uct extension, which stores expanded nodes in memory...http://chessprogramming.wikispaces.com/UCT