playouts

An abstract strategy board game for two players
Post Reply
flok
Posts: 18
Joined: Sat Jan 02, 2016 9:04 pm
Contact:

playouts

Post by flok » Tue Nov 30, 2021 12:48 am

Hi,

My single threaded program performs 216 playouts per second (on average 62 'moves').
That's not a lot is it? Or is it?
www.ataxx.org / www.vanheusden.com

Rémi Coulom
Posts: 156
Joined: Tue Feb 12, 2008 8:31 pm
Contact:

Re: playouts

Post by Rémi Coulom » Tue Nov 30, 2021 11:20 am

I have just run a benchmark, and Crazy Stone does 4366.81 simulations per second on 19x19, from the empty starting position (Ryzen 7 5800X). This is with patterns and many advanced heuristics. So yes, your playouts are slow.

Without heuristics, it may be around 10k per second. You must be doing something wrong. Are you programming in C++?

For performance, one fundamental aspect is your board data structure. You should not have to loop over a string each time to determine its number of liberties. You need incrementally updated data structures that will tell you immediately how many liberties a string has.

flok
Posts: 18
Joined: Sat Jan 02, 2016 9:04 pm
Contact:

Re: playouts

Post by flok » Wed Dec 01, 2021 10:35 am

Rémi Coulom wrote:
Tue Nov 30, 2021 11:20 am
I have just run a benchmark, and Crazy Stone does 4366.81 simulations per second on 19x19, from the empty starting position (Ryzen 7 5800X). This is with patterns and many advanced heuristics. So yes, your playouts are slow.

Without heuristics, it may be around 10k per second. You must be doing something wrong. Are you programming in C++?
That's quite a difference! DellaBaduck is in C++ indeed.
For performance, one fundamental aspect is your board data structure. You should not have to loop over a string each time to determine its number of liberties. You need incrementally updated data structures that will tell you immediately how many liberties a string has.
I was thinking of incremental updates but I wonder if all the administration won't be negating the speedimprovement. Well the proof is in the eating of the pudding I guess :-)
www.ataxx.org / www.vanheusden.com

flok
Posts: 18
Joined: Sat Jan 02, 2016 9:04 pm
Contact:

Re: playouts

Post by flok » Fri Dec 03, 2021 11:01 pm

Slight increase to 355 playouts per second (1 thread, 61 stones per playout on average)
www.ataxx.org / www.vanheusden.com

Rémi Coulom
Posts: 156
Joined: Tue Feb 12, 2008 8:31 pm
Contact:

Re: playouts

Post by Rémi Coulom » Fri Dec 03, 2021 11:42 pm

flok wrote:
Fri Dec 03, 2021 11:01 pm
Slight increase to 355 playouts per second (1 thread, 61 stones per playout on average)
Which board size?

You must be doing something very wrong.

flok
Posts: 18
Joined: Sat Jan 02, 2016 9:04 pm
Contact:

Re: playouts

Post by flok » Fri Dec 03, 2021 11:51 pm

Rémi Coulom wrote:
Fri Dec 03, 2021 11:42 pm
flok wrote:
Fri Dec 03, 2021 11:01 pm
Slight increase to 355 playouts per second (1 thread, 61 stones per playout on average)
Which board size?
You must be doing something very wrong.
Boardsize 9. This version still recreates every chain (string) and so on.
I transformed the current version into an incremental, but it played even worse (around 75 playouts/s).
I have an idea how to improve that, need to implement it.
www.ataxx.org / www.vanheusden.com

Post Reply