Discussion of chess software programming and technical issues.
Moderators: hgm , Rebel , chrisw
flok
Post
by flok » Fri Oct 20, 2017 2:47 pm
Hi,
I tried that but:
Code: Select all
Rank Name Elo + - games score oppo. draws
1 dorpsgek 134 5 4 28434 70% -44 16%
2 trunk 87 5 6 9524 44% 134 20%
3 pvs2b2 34 6 6 9474 37% 134 16%
4 lmrpvs -254 7 8 9436 8% 134 13%
As you see the to pvs variants I tried still play far worse than the non-pvs version (trunk).
abulmo2
Posts: 433 Joined: Fri Dec 16, 2016 11:04 am
Location: France
Full name: Richard Delorme
Post
by abulmo2 » Fri Oct 20, 2017 5:20 pm
I guess there is one or several bugs in other places.
Within the loops (in both search & quiescence), the initialization to 0 of the
score variable looks suspect to me. In some (rare ?) cases,
bestval will be set to 0 instead of a more legible negative score.
Code: Select all
int score = 0;
#ifdef USE_TT
if (!addToHistory(sd -> history, newHash.newHash))
#endif
{
should be replaced by
Code: Select all
int score = -infinite; // anything <= bestval
#ifdef USE_TT
if (!addToHistory(sd -> history, newHash.newHash))
#endif
{
Richard Delorme
flok
Post
by flok » Fri Oct 20, 2017 5:32 pm
The score will be 0 if a position repeats. This is to prevent 3-repeats.
abulmo2
Posts: 433 Joined: Fri Dec 16, 2016 11:04 am
Location: France
Full name: Richard Delorme
Post
by abulmo2 » Fri Oct 20, 2017 5:41 pm
Sorry, your code is obviously too clever for me
Richard Delorme
AlvaroBegue
Posts: 931 Joined: Tue Mar 09, 2010 3:46 pm
Location: New York
Full name: Álvaro Begué (RuyDos)
Post
by AlvaroBegue » Fri Oct 20, 2017 5:49 pm
abulmo2 wrote: Sorry, your code is obviously too clever for me
That is a problem. Clever code hides bugs. Code should be as clear as possible.
Of course I am guilty of writing clever code myself, but I do make some effort to keep things simple.
The way I handle repetitions is to call a function that checks for repetition and 50-move rule before the recursive call to negamax:
Code: Select all
score = board.draw() ? 0 : -negamax(-beta, -alpha, depth - 1);
abulmo2
Posts: 433 Joined: Fri Dec 16, 2016 11:04 am
Location: France
Full name: Richard Delorme
Post
by abulmo2 » Sat Oct 21, 2017 9:20 am
AlvaroBegue wrote:
That is a problem. Clever code hides bugs. Code should be as clear as possible.
Of course I am guilty of writing clever code myself, but I do make some effort to keep things simple.
The way I handle repetitions is to call a function that checks for repetition and 50-move rule before the recursive call to negamax:
Code: Select all
score = board.draw() ? 0 : -negamax(-beta, -alpha, depth - 1);
My programs detect draws (3-fold repetition, 50-moves rule and lack of material) at the start of the negamax function, ie after the recursive call.
Code: Select all
if (board.isDraw) return 0;
Before or after a function call is not important, but naming such a function with the word "draw" inside is.
I am impressed by the work that is behind Embla, that contains many more things than in Amoeba, like syzygy table support, mysql/sqlite3 opening books, multithreading, etc. But I am also disappointed by the weakness of the engine, that is much weaker than my bare engine
https://github.com/abulmo/Dumb . I am convinced that some bugs or poor implementation are hidden in the code and prevent it to progress.
Richard Delorme
flok
Post
by flok » Sat Oct 21, 2017 6:04 pm
Possibly yes, but I have no idea where.
Note that the movegen is a bit slow, that doesn't help either.
Henk
Posts: 7220 Joined: Mon May 27, 2013 10:31 am
Post
by Henk » Sat Oct 21, 2017 6:15 pm
Posting on this website makes your code also worse is my experience. Best is to stick to your own bad coding ideas.
Sven
Posts: 4052 Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle
Post
by Sven » Sat Oct 21, 2017 8:43 pm
Henk wrote: Posting on this website makes your code also worse is my experience. Best is to stick to your own bad coding ideas.
So maybe not posting for six months would give +600 Elo for Skipper?
Henk
Posts: 7220 Joined: Mon May 27, 2013 10:31 am
Post
by Henk » Sat Oct 21, 2017 11:59 pm
Sven wrote: Henk wrote: Posting on this website makes your code also worse is my experience. Best is to stick to your own bad coding ideas.
So maybe not posting for six months would give +600 Elo for Skipper?
It would already be an improvement if Skippers rating stayed equal.