What was the verdict on Protector 1.2.7?

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

Moderators: hgm, Rebel, chrisw

User avatar
Graham Banks
Posts: 41500
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ

Re: What was the verdict on Protector 1.2.7?

Post by Graham Banks »

Dr.Wael Deeb wrote:
Graham Banks wrote:
Dr.Wael Deeb wrote:Speaking of which,a new version of Protector is out....
Protector 1.2.8 :D

http://sourceforge.net/projects/protector/

Dr.D
Looks like linux only at this stage or am I missing the link to a windows exe?
No,the Windows compiles are there Graham....
Dr.D
Thanks Wael.
I'm still looking for a definitive answer to my original question though. Do you know whether Protector is an original engine that uses some ideas from Toga, or is basically Toga? Nobody seems keen to say one way or the other.

Cheers,
Graham.
gbanksnz at gmail.com
User avatar
Graham Banks
Posts: 41500
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ

Re: What was the verdict on Protector 1.2.7?

Post by Graham Banks »

I asked Norman Schmidt for his opinion. His comments:
Here’s it in a nutshell:

Protector is enormously different than toga…

I’m hard pressed to recognize any close similarities in the source code…
data structures are completely different…
protector uses unique bitboard routines to which I’m unfamiliar..
(and I’ve seen them all)

it has many many features not found in toga:
Supports Nalimov tablebases
xBoard and UCI
has a find-mate routine for problem solving
EPD
reads/write/analyzes PGN files
windows 32 bit, 64-bit, Mac and Linux support
uses log file
test modules…with many many debugging dump options
etc.

Except eval.cpp (evaluation.c - protector is written in very clean/clear ANSI C - Bob Hyatt would be proud…

Eval has been completely re-written for bitboards, but values/parameters do indeed match Toga and there is a definite similarity.
Here (in eval) is the only real noticable similarity to Toga…(but it’s still difficult to discern unless you’re intimate with Fruit/Toga).

Of all the functions in Protector…( 100s) 99% are completly unique.
The guy made a big mistake mentioning Toga at all in his readme..!

I challenge anybody to find 1 line of code that protector and Toga share??
It doesn’t exist…
please send it to Bob Hyatt for comparison
gbanksnz at gmail.com
Christopher Conkie
Posts: 6073
Joined: Sat Apr 01, 2006 9:34 pm
Location: Scotland

Re: What was the verdict on Protector 1.2.7?

Post by Christopher Conkie »

Graham Banks wrote:
Dr.Wael Deeb wrote:
Graham Banks wrote:
Dr.Wael Deeb wrote:Speaking of which,a new version of Protector is out....
Protector 1.2.8 :D

http://sourceforge.net/projects/protector/

Dr.D
Looks like linux only at this stage or am I missing the link to a windows exe?
No,the Windows compiles are there Graham....
Dr.D
Thanks Wael.
I'm still looking for a definitive answer to my original question though. Do you know whether Protector is an original engine that uses some ideas from Toga, or is basically Toga? Nobody seems keen to say one way or the other.

Cheers,
Graham.
I'm retired. I think you should use what you want to (and don't read into that too much). That is the best answer I can give to you in particular.

:D

Christopher
CRoberson
Posts: 2056
Joined: Mon Mar 13, 2006 2:31 am
Location: North Carolina, USA

Re: What was the verdict on Protector 1.2.7?

Post by CRoberson »

Graham Banks wrote:Original engine or Toga clone?
At present I'm treating it as original, unless the consensus says otherwise.

Cheers,
Graham.
I made a quick look over the telling areas for Toga/Fruit clones. These areas are the search and the eval. Is it exactly Toga/Fruit - No.
Is all of Toga/Fruit's personality/style under the hood - YES.

The eval contains all of Toga/Fruit. Piece mobility is calculated exactly the same way and with exactly the same values. One can go down
through the eval source for both programs and easily see identical bonuses/penalties for various pawn structural issues for both opening
and endgame stages. The stages are calculated the same as Fruit.

The main search is split into two parts: searchBest and SearchBestWithoutNullmove. Only Fruti and its clones do that.

Yes, there is more in it than Fruti. So, it is a superset of Fruit. I didn't look at move ordering or move generation. For all I know that could be cloned from Crafty.

I'll say this: if I were to rerelease Protector with all the eval code learned from Fruit/Toga ripped out it would loose several hundred rating points.

The clone discussions have been around for decades and we have batted around the definition of clone. A few years ago, we converged
on our clearest definition of what is and isn't acceptable. I'll paraphrase Bob's definition of black box code here:
It is ok to reuse an algorithm (not code) if that algorithm is a black box. An algorithm is a black box if no matter how you write it,
it can only produce the same output for a given input as anybody else's code would.

Sections of code and algorithms which define the programs personality/style are not acceptable for reproduction. This includes,
but not limited to: the position evaluation, move ordering, pruning, reduction and extension conditions and transposition tables.
Given that Protector clearly copied the Fruit/Toga's eval and bonus/penalty values into Protector. It violates the above statement. The fact that he added extra stuff to the eval doesn't make a difference.The search similarities are almost meaningless given the violations in the eval code.

BTW: the same goes for Sloppy's eval and it's eval is more of a Fruit clone than Protector's thanks to Protector's extra eval code.Sloppy's author admits that in a comment in the eval source code.

An example of something commonly reused: Random number generators. They are required to create hash numbers, but do nothing
to define the personality/style of the programs play. There is another
case in which actual code reuse is nearly acceptable: if the code has to do with OS interaction and the OS doesn't allow any other way
to do that sort of thing. Basically, that falls into the black box definition but does allow for some code reuse.

Mobility can be calculated in another program in lots of different ways. Fruit's method is just one way and Fruit's mobility values and equations are just one way to do it. Thus, reusing them is cloning.

In other words, you could rewrite the entire program in another coding language with your own style of coding. However, if you reuse the eval values and algorithms or any other part that defines playing personality/style then it is cloning.

There are lots of ways to create an eval routine, a pawn eval or a piece mobility eval, therefore reusing those algorithms or source code is cloning.

To me there seems an attempt to make his own program. Maybe not, to completely say that I'd have to read his move gen and move ordering code.

If the eval was rewritten without reuse of Fruit and the move gen/ordering code isn't a clone of any other program, then such a new version wouldn't be a clone.
So, this version is a clone but give the guy a chance to fix the issues in a new version.
User avatar
Graham Banks
Posts: 41500
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ

Re: What was the verdict on Protector 1.2.7?

Post by Graham Banks »

CRoberson wrote:
Graham Banks wrote:Original engine or Toga clone?
At present I'm treating it as original, unless the consensus says otherwise.

Cheers,
Graham.
I made a quick look over the telling areas for Toga/Fruit clones. These areas are the search and the eval. Is it exactly Toga/Fruit - No.
Is all of Toga/Fruit's personality/style under the hood - YES.

The eval contains all of Toga/Fruit. Piece mobility is calculated exactly the same way and with exactly the same values. One can go down
through the eval source for both programs and easily see identical bonuses/penalties for various pawn structural issues for both opening
and endgame stages. The stages are calculated the same as Fruit.

The main search is split into two parts: searchBest and SearchBestWithoutNullmove. Only Fruti and its clones do that.

Yes, there is more in it than Fruti. So, it is a superset of Fruit. I didn't look at move ordering or move generation. For all I know that could be cloned from Crafty.

I'll say this: if I were to rerelease Protector with all the eval code learned from Fruit/Toga ripped out it would loose several hundred rating points.

The clone discussions have been around for decades and we have batted around the definition of clone. A few years ago, we converged
on our clearest definition of what is and isn't acceptable. I'll paraphrase Bob's definition of black box code here:
It is ok to reuse an algorithm (not code) if that algorithm is a black box. An algorithm is a black box if no matter how you write it,
it can only produce the same output for a given input as anybody else's code would.

Sections of code and algorithms which define the programs personality/style are not acceptable for reproduction. This includes,
but not limited to: the position evaluation, move ordering, pruning, reduction and extension conditions and transposition tables.
Given that Protector clearly copied the Fruit/Toga's eval and bonus/penalty values into Protector. It violates the above statement. The fact that he added extra stuff to the eval doesn't make a difference.The search similarities are almost meaningless given the violations in the eval code.

BTW: the same goes for Sloppy's eval and it's eval is more of a Fruit clone than Protector's thanks to Protector's extra eval code.Sloppy's author admits that in a comment in the eval source code.

An example of something commonly reused: Random number generators. They are required to create hash numbers, but do nothing
to define the personality/style of the programs play.

Mobility can be calculated in another program in lots of different ways. Fruit's method is just one way and Fruit's mobility values and equations are just one way to do it. Thus, reusing them is a cloning.

In other words, you could rewrite the entire program in another coding language with your own style of coding. However, if you reuse the eval values and algorithms or any other part that defines playing personality/style then it is cloning.

There are lots of ways to create an eval routine, a pawn eval or a piece mobility eval, therefore reusing those algorithms or source code is cloning.

To me there seems an attempt to make his own program. Maybe not, to completely say that I'd have to read his move gen and move ordering code.

If the eval was rewritten without reuse of Fruit and the move gen/ordering code isn't a clone of any other program, then such a new version wouldn't be a clone.
So, this version is a clone but give the guy a chance to fix the issues in a new version.
Thanks for taking the time to explain, Charles.

There is a new version out - Protector 1.2.8. Perhaps it might better meet your definition of an original engine?

I guess that on the basis that I've already tested and continue to test Sloppy, testing Protector is okay for me. You believe that Sloppy should be classed as part of the Fruit/Toga family?

It would be interesting to hear Ilari's thoughts on what you've said.

Regards,
Graham.
gbanksnz at gmail.com
CRoberson
Posts: 2056
Joined: Mon Mar 13, 2006 2:31 am
Location: North Carolina, USA

Re: What was the verdict on Protector 1.2.7?

Post by CRoberson »

it was 1.2.8 that I reviewed - it is a clone.
CRoberson
Posts: 2056
Joined: Mon Mar 13, 2006 2:31 am
Location: North Carolina, USA

Re: What was the verdict on Protector 1.2.7?

Post by CRoberson »

Graham Banks wrote: Thanks for taking the time to explain, Charles.

You believe that Sloppy should be classed as part of the Fruit/Toga family?

It would be interesting to hear Ilari's thoughts on what you've said.

Regards,
Graham.
/* Sloppy - eval.c
Functions for the static evaluation of the board.
At the moment most of the evaluation features are copied from
Fruit 2.1 by Fabien Letouzey. The code had to be re-written though.

Copyright (C) 2007 Ilari Pihlajisto
User avatar
Graham Banks
Posts: 41500
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ

Re: What was the verdict on Protector 1.2.7?

Post by Graham Banks »

CRoberson wrote:it was 1.2.8 that I reviewed - it is a clone.
The following snippets are from the Protector 1.2.8 readme file:
Protector is a Bitboard-based chess program that communicates with a chess GUI via the UCI protocol.

Protector was written from scratch as a bitboard-based program in ANSI-C. It incorporates many ideas from Crafty, Fruit and Toga -- but in many aspects it is different from any of these programs (for this reason it will not be possible to copy code from Protector to Toga, for example). Please take a look at the sources for more details.

Protector is based on many great ideas from the following people: Fabien Letouzey (pvnodes, blending of opening and endgame values), Thomas Gaksch (pvnode extensions, extended futility pruning, space attack eval), Robert Hyatt (consistent hashtable entries), Andrew Kadatch, Eugene Nalimov (tablebases), Stefan Meyer-Kahlen (UCI), Gerd Isenberg (magic bitboards), Mike Donnig (testing), Vincent van Diepeveen (for reminding me to respect the value of someone else's work). Without their contributions Protector would not be what it is. Thank you so much.
Apart from Sloppy and Protector, which other engines do you regard as clones (assuming that you already regard Grapefruit, Cyclone, Toga and TheMadPrune as clones)?

Cheers,
Graham.
gbanksnz at gmail.com
User avatar
Graham Banks
Posts: 41500
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ

Recommended reading for all those interested

Post by Graham Banks »

CRoberson wrote:
Graham Banks wrote: Thanks for taking the time to explain, Charles.

You believe that Sloppy should be classed as part of the Fruit/Toga family?

It would be interesting to hear Ilari's thoughts on what you've said.

Regards,
Graham.
/* Sloppy - eval.c
Functions for the static evaluation of the board.
At the moment most of the evaluation features are copied from
Fruit 2.1 by Fabien Letouzey. The code had to be re-written though.

Copyright (C) 2007 Ilari Pihlajisto
Searching back through past threads, I found this one:
http://www.talkchess.com/forum/viewtopi ... ght=sloppy
A recommended read through for all those interested in the clone discussion because it presents the arguments of both sides.
gbanksnz at gmail.com
User avatar
Graham Banks
Posts: 41500
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ

Re: Recommended reading for all those interested

Post by Graham Banks »

Sorry - the thread in question started here (and is about Sloppy 0.1.1):
http://www.talkchess.com/forum/viewtopi ... at&start=0
gbanksnz at gmail.com