Discussion of anything and everything relating to chess playing software and machines.
Moderators: hgm, Dann Corbit, Harvey Williamson
Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
-
dkappe
- Posts: 860
- Joined: Tue Aug 21, 2018 5:52 pm
- Full name: Dietrich Kappe
Post
by dkappe » Sat Mar 28, 2020 9:14 pm
For those wanting to tinker with their own NN engine, I present a0lite. It's written in python. The core of the algorithm is just 95 lines.
https://github.com/dkappe/a0lite
It's meant for tinkering. As such, more complex developments will be in branches rather than in the master. Also check out the forks and see what others are doing.
You will need to install badgyal for the neural nets.
By default it uses MeanGirl-8 (32x4) net on CPU. Plays about ~2050 CCRL in this configuration. The shell script a0lite.sh works as a uci engine. You can find a log file, a0lite.log in the same dir as the script.
-
jhellis3
- Posts: 488
- Joined: Fri Aug 16, 2013 10:36 pm
Post
by jhellis3 » Mon Mar 30, 2020 4:39 pm
This seems like it would be a good test bed for ideas; I wonder what happens if one only increments visits for own moves...
-
jhellis3
- Posts: 488
- Joined: Fri Aug 16, 2013 10:36 pm
Post
by jhellis3 » Mon Mar 30, 2020 5:12 pm
I don't really know python syntax but I am guessing
Code: Select all
if turnfactor > 0:
current.number_visits += 1
in the while loop would get the job done.
-
cucumber
- Posts: 138
- Joined: Sun Oct 14, 2018 6:21 pm
- Full name: JSmith
Post
by cucumber » Mon Mar 30, 2020 5:16 pm
Your code is beautifully succinct.
-
dkappe
- Posts: 860
- Joined: Tue Aug 21, 2018 5:52 pm
- Full name: Dietrich Kappe
Post
by dkappe » Mon Mar 30, 2020 7:28 pm
I've created a branch called 'batching' that uses virtual loss to gather batches of positions for the gpu.
https://github.com/dkappe/a0lite/tree/batching
The speed now seems dominated by the python-chess code, and my inefficient implementation.
On a 2070, the difference with batching is
Code: Select all
info depth 1 seldepth 1 score cp 22 nodes 10000 nps 1170 pv e2e4
bestmove e2e4
and without
Code: Select all
info depth 1 seldepth 1 score cp 28 nodes 10000 nps 446 pv e2e4
bestmove e2e4
Will try to fold in tree reuse in another branch and also get a 256x20 net working.
Last edited by
dkappe on Mon Mar 30, 2020 7:30 pm, edited 1 time in total.
-
dkappe
- Posts: 860
- Joined: Tue Aug 21, 2018 5:52 pm
- Full name: Dietrich Kappe
Post
by dkappe » Mon Mar 30, 2020 7:29 pm
Ah, you'll need to reinstall badgyal, as it has some bulk eval support added.
-
dkappe
- Posts: 860
- Joined: Tue Aug 21, 2018 5:52 pm
- Full name: Dietrich Kappe
Post
by dkappe » Tue Mar 31, 2020 2:59 am
Tried out a0lite with batching and tree reuse at a tc of 30 m + 5 sec. Donna 4.1 lost on time, but it was a foregone conclusion.