New engine "Roc"

Discussion of anything and everything relating to chess playing software and machines.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
THyer
Posts: 40
Joined: Fri Jul 22, 2016 5:51 pm

New engine "Roc"

Post by THyer » Wed Jan 18, 2017 1:47 am

Roc is a new chess engine, derived from Gull 3.

Roc has the following refinements:
-- based on a C++ port of Gull 3, eliminating goto statements.
-- fixes some minor bugs found in the Gull source
-- unit of valuation changed from 1 cp to 1/4 cp
-- extends Gull's two phases (opening, endgame) to 3 phases (opening, middle, endgame) plus a phase-like contribution for closed-ness
-- supports a contempt setting
-- adds king tropism to evaluation

In tests so far, Roc appears to be slightly stronger (5 +/- 5 Elo) than Gull 3. The present code builds only on Windows. It is in the public domain at https://github.com/TomHyer/Roc.
"Wise and cruel was the Bird, and wise and cruel were the Sons of the Bird."

carldaman
Posts: 1738
Joined: Sat Jun 02, 2012 12:13 am

Re: New engine "Roc"

Post by carldaman » Wed Jan 18, 2017 4:37 am

THyer wrote:Roc is a new chess engine, derived from Gull 3.

Roc has the following refinements:
-- based on a C++ port of Gull 3, eliminating goto statements.
-- fixes some minor bugs found in the Gull source
-- unit of valuation changed from 1 cp to 1/4 cp
-- extends Gull's two phases (opening, endgame) to 3 phases (opening, middle, endgame) plus a phase-like contribution for closed-ness
-- supports a contempt setting
-- adds king tropism to evaluation

In tests so far, Roc appears to be slightly stronger (5 +/- 5 Elo) than Gull 3. The present code builds only on Windows. It is in the public domain at https://github.com/TomHyer/Roc.
Thanks, but the link simply does not work.

CL


carldaman
Posts: 1738
Joined: Sat Jun 02, 2012 12:13 am

Re: New engine "Roc"

Post by carldaman » Wed Jan 18, 2017 7:31 am

Thanks. Hopefully someone can compile it. :)

mar
Posts: 2015
Joined: Fri Nov 26, 2010 1:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: New engine "Roc"

Post by mar » Wed Jan 18, 2017 9:37 am

THyer wrote:-- based on a C++ port of Gull 3, eliminating goto statements.
You're joking, right? What has C++ to do with eliminating goto statements?
And that should be a feature (value added = ??)

Sometimes a single goto statement will save you from complicated logic so in fact there is nothing wrong with gotos now and then (bailout is usually more readable than deep nesting).

I'd prefer things like break n; or continue n; that would simply break/continue the n-th outer loop (or break switch) => eliminating the need for gotos/extra logic completely (except that you'd have to be careful when refactoring loops)

User avatar
velmarin
Posts: 1600
Joined: Mon Feb 21, 2011 8:48 am

Re: New engine "Roc"

Post by velmarin » Wed Jan 18, 2017 11:06 am

mar wrote:
THyer wrote: Option 1...-- based on a C++ port of Gull 3.

Option 2....Eliminating goto statements.
You have to read it separately.
There is an obsession to clean the goto sentences of Gull's code.
I eliminated almost all and was not noticed in the performance.

THyer
Posts: 40
Joined: Fri Jul 22, 2016 5:51 pm

Re: New engine "Roc"

Post by THyer » Wed Jan 18, 2017 3:00 pm

In the particular case of Gull, the goto statements do not degrade performance, but do often obfuscate the code. Many can be replaced very easily, while some require code rearrangement.

In gen_kpk, goto seems appropriate and I have not attempted to remove it.

One of the trickiest is the test for acceptance of hash moves in pv_search. Here, after unraveling the goto into a normal loop, the nature of the algorithm is much clearer and it looks like improvement is possible.
"Wise and cruel was the Bird, and wise and cruel were the Sons of the Bird."

THyer
Posts: 40
Joined: Fri Jul 22, 2016 5:51 pm

Re: New engine "Roc"

Post by THyer » Wed Jan 18, 2017 3:01 pm

Thanks for the correction.
"Wise and cruel was the Bird, and wise and cruel were the Sons of the Bird."

User avatar
velmarin
Posts: 1600
Joined: Mon Feb 21, 2011 8:48 am

Re: New engine "Roc"

Post by velmarin » Wed Jan 18, 2017 3:30 pm

Image

Compiles correct with the solution included in the Github, with Intel compiler and Visual C ++ compiler, but does not respond in the console output.

Oh, install en Fritz 15 is OK.
Last edited by velmarin on Wed Jan 18, 2017 3:35 pm, edited 1 time in total.

THyer
Posts: 40
Joined: Fri Jul 22, 2016 5:51 pm

Re: New engine "Roc"

Post by THyer » Wed Jan 18, 2017 3:33 pm

That is surprising to me. I have been testing with cutechess and Arena, rather than running directly at the command line. I will try this tonight (US time).
"Wise and cruel was the Bird, and wise and cruel were the Sons of the Bird."

Post Reply