CDrill 1800

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

Moderators: hgm, Rebel, chrisw

Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: CDrill 1800

Post by Ferdy »

mar wrote:Very nice project Ferdy!

Care to explain a bit more about how you try to make CDrill play more human-like? I'm allergic to this kind of mantra but I know if you try to make something play human-like it's way more
than random tweaking of piece values.

I often play my old iOS chess app built on top of cheng3 and I have to say I messed up with difficulty scaling.
Adding noise to eval without tuning it is a disaster, I can win ~30% against "skill 99" but I only have 2 draws out of about 100 against skill 100 (full power) - my bad,
the good thing is it kills my ego :)
I used to play at fide elo 1900 or so, one time drawing an IM at 2400+, winning and drawing some games with NM - our local National Master with fide elo rating around 2000+ and from time to time loses to a player with a rating of 1700 and below when you are out-prepared in the opening. This is my target, an engine that can play close to my rating with some positional ideas added into it. In the tactical side, I am sure the engine will be able to figure it out :). Developing this engine is actually holding back all your pruning and reduction techniques. This is why this engine has no null move, no transposition table, no LMR etc. At the moment I will be concentrating on adding evaluation features to shape its style. Yesterday I let it play with Mephisto Gideon Pro a stronger engine than CDrill and found this.
[d]rq2k2r/3pppbp/n5p1/2pP4/4P1n1/2N2N1P/PP2QPP1/R1B2RK1 b kq - 0 12
CDrill black played Bg7xc3 giving up its dark-squared bishop too early where white has a dark-squared bishop. This is one of the things that I need to teach CDrill via evaluation no to do it. Pawel also suggested some hints in another post on piece development that may look like a human is playing. But first I need to create a base line even for engine-engine records, that it is not playing too much above fide elo 2000. Kai suggested an approximation SSDF rating + 150 = fide elo, around this rating range. Also I will play myself vs CDrill at TC 15m + 5s inc/move. Not too fast and not too slow - rated match (perhaps 12 games at first), but I need to create a small random book for CDrill first. I already played it on some blitz games, and I can outplay it if I am able to launch an attack to its king. I can also out play it in ending probably because it does not have the transposition table. I am actually thinking of adding transposition table (minimal use only) eventually as its ending play is not human-like. I will found more on this later after taking some serious match with it. I don't care much if it will go down below fide elo 2000 as long as it plays like human.
So I still think that maybe time odds scaling as I do in cheng4 is the way to go (without expensive tuning).
That certainly is possible if just scaling down its strength.
Personalities sound really good but there's still the tweaking issue to match real strength.
I am surprised to this, one time I tune it to match the moves of Morphy (later I will upload this Morphy test suite), I got a weird eval parameter values. See the CDrill site.
CDrill default:

Code: Select all

KingAttackWeight 100
ThreatWeight 100
MobilityWeight 100
MaterialWeight 100
PassedPawnWeight 100
PawnStructureWeight 100
CDrill Morphy:

Code: Select all

KingAttackWeight 10
ThreatWeight 220
MobilityWeight 190
MaterialWeight 180
PassedPawnWeight 90
PawnStructureWeight 140
The KingAttackWeight has been mangled convincingly here :)
Looking at the code, there was a mixed of eval features. My ThreatWeight is about attacking opp pieces anywhere on the board, and then this KingAttackWeight involves attacking opp piece near opp king, so this was double counted, the personality auto-tuner is able to figure this out :oops:

Playing the engines at blitz, the Morphy is able to score well too, and you have a completely different style of play. Morphy is too aggressive and due to its aggressiveness it was losing more.
Head to head statistics:

Code: Select all

1) CDrill 1800        2000.0 :     17 (+8,=3,-6),  55.9 %

   vs.                       :  games ( +, =, -),   (%) :    Diff
   CDrill 1800 Morphy        :     17 ( 8, 3, 6),  55.9 :   +44.8

2) CDrill 1800 Morphy 1955.2 :     17 (+6,=3,-8),  44.1 %

   vs.                       :  games ( +, =, -),   (%) :    Diff
   CDrill 1800               :     17 ( 6, 3, 8),  44.1 :   -44.8
I also wanted to ask - do you have some pseudo-random book with a lot of variation?
If you mean a book for engine, I don't have at the moment. I just plan to create a shallow and wide polyglot book.
I'm tempted to start a mini-project with big chessboard and one engine plus high-variety book,
but as usual motivation is #1 problem, though I'm tired of elo-hunting I admit :)
What do you mean by big chessboard?
elo-hunting? forget it, just leave it to the Stockfish armies :D.
mesilikas
Posts: 39
Joined: Mon Jan 01, 2018 12:54 pm

Re: CDrill 1800

Post by mesilikas »

Hello mr Ferdinand! I downloaded your engine 3 days ago. The fact that Cdrill plays human style chess at around 1850 elo was the reason (my fide elo is 1850). But i was disappointed !
How can a human at this level moves like that ( early queen moves in the opening, delay castling, pawn pushing here and there) ? I played some games at 15 15 time control under Arena Gui and i succeded with a plus score...
So i tuned the engine and i think my configuration is more human like than default and positional you have in your download link.
Here we go:

Cdrill Build 4 Positional Personality.

Material Weight 280
Pawn Structure Weight 170
Passed Pawn Weight 90
Mobility Weight 200
Threat Weight 300
King Attack Weight 30
King Shelter Weight 250
Repeat Score -50

Give a try when you have the time.
Thank you for your interesting engine.
(Sorry for my English).
User avatar
PeterO
Posts: 215
Joined: Sun Jul 31, 2016 6:35 pm

Re: CDrill 1800

Post by PeterO »

Great project. What do you think about blundering sometimes? Espacially if the situatin is very complex?

Peter
mesilikas
Posts: 39
Joined: Mon Jan 01, 2018 12:54 pm

Re: CDrill 1800

Post by mesilikas »

We don't need this feature when we play training games against an engine. The subject based on winning with a good plan or to outplay engine with a special tactic (very difficult).
I played an hour before a game with Cdrill with the following parametres:

Cdrill Build 4 Active Personality:

Material Weight 90
Pawn Structure Weight 100
Passed Pawn Weight 180
Mobility Weight 250
Threat Weight 300
King Attack Weight 30
King Shelter Weight 150
Repeat Score -50

It was interesting...
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: CDrill 1800

Post by Ras »

Ferdy wrote:you can post here your engine's setting to simulate a human play at 1800 elo.
For the CT800, setting the node rate to 2 or 3 kNPS and maybe 10 centipawns noise should achieve that. In V1.20, a 3-ply pre-search will be performed without node rate limit, so the displayed total node rate can be much higher.

V1.30 will have better node rate control and Elo setting via UCI.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: CDrill 1800

Post by Ferdy »

mesilikas wrote:Hello mr Ferdinand! I downloaded your engine 3 days ago. The fact that Cdrill plays human style chess at around 1850 elo was the reason (my fide elo is 1850). But i was disappointed !
How can a human at this level moves like that ( early queen moves in the opening, delay castling, pawn pushing here and there) ? I played some games at 15 15 time control under Arena Gui and i succeded with a plus score...
So i tuned the engine and i think my configuration is more human like than default and positional you have in your download link.
Here we go:

Cdrill Build 4 Positional Personality.

Material Weight 280
Pawn Structure Weight 170
Passed Pawn Weight 90
Mobility Weight 200
Threat Weight 300
King Attack Weight 30
King Shelter Weight 250
Repeat Score -50

Give a try when you have the time.
Thank you for your interesting engine.
(Sorry for my English).
Thanks for the feedback and your settings. I will certainly try it.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: CDrill 1800

Post by Ferdy »

SzG wrote:How are you preventing it from being too strong?
Limit the evaluation knowledge, disable pruning and reduction techniques. And there is a plan:

Code: Select all

Don't always win in KNB vs K
found in CDrill issues.
https://github.com/fsmosca/CDrill/issues

There can be a lot methods to decrease strength that I plan, like reduce the depth and nodes search, incorrect material evaluation from time to time, forget certain piece presence from time to time, allows its king and queen to be forked by a knight and others.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: CDrill 1800

Post by Ferdy »

PeterO wrote:Great project. What do you think about blundering sometimes? Espacially if the situatin is very complex?

Peter
That is interesting indeed. I think if I implement wrong material values randomly (q=500, r=1000, or r=300, b=500) and other material combo it may happen that the engine would make a blunder move. Another sure thing to blunder is by using multi pv.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: CDrill 1800

Post by Ferdy »

Ras wrote:
Ferdy wrote:you can post here your engine's setting to simulate a human play at 1800 elo.
For the CT800, setting the node rate to 2 or 3 kNPS and maybe 10 centipawns noise should achieve that. In V1.20, a 3-ply pre-search will be performed without node rate limit, so the displayed total node rate can be much higher.

V1.30 will have better node rate control and Elo setting via UCI.
What do you mean by "10 centipawns noise"?
Ras
Posts: 2487
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: CDrill 1800

Post by Ras »

Ferdy wrote:What do you mean by "10 centipawns noise"?
The engine offers a UCI option to add noise to the eval, measured in centipawns.