Patricia 2.0 - likely the most aggressive chess engine ever made

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

Moderators: hgm, Rebel, chrisw

Damas Clásicas
Posts: 14
Joined: Thu Aug 22, 2019 6:11 am
Full name: Herson P. Guier

Re: Patricia 2.0 - likely the most aggressive chess engine ever made

Post by Damas Clásicas »

I thought the crash problem in Patricia 2.0 was related when it was using ''Ponder On''. Because today, I made some tests without that and Patricia 2.0 ran a little better, but I also had some crashes. Before this, all my tests were with ''Ponder ON'' (where I used 1 core for every engine) and I had more crashes. After the crash, a little window appears and says: ''Patricia caused an exception'' (and a button thats says ''Ok''). If one press ''Ok'', a message with the same thing appears again very quickly.
User avatar
Guenther
Posts: 4637
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: Patricia 2.0 - likely the most aggressive chess engine ever made

Post by Guenther »

Damas Clásicas wrote: Sat Apr 06, 2024 11:40 am I thought the crash problem in Patricia 2.0 was related when it was using ''Ponder On''. Because today, I made some tests without that and Patricia 2.0 ran a little better, but I also had some crashes. Before this, all my tests were with ''Ponder ON'' (where I used 1 core for every engine) and I had more crashes. After the crash, a little window appears and says: ''Patricia caused an exception'' (and a button thats says ''Ok''). If one press ''Ok'', a message with the same thing appears again very quickly.
Why don't you just post at least the positions/pgns when the 'crashes' happened in your environment? (and more infos about GUI/tc/hash comp specs etc.)
https://rwbc-chess.de

trollwatch:
Talkchess nowadays is a joke - it is full of trolls/idiots/people stuck in the pleistocene > 80% of the posts fall into this category...
Damas Clásicas
Posts: 14
Joined: Thu Aug 22, 2019 6:11 am
Full name: Herson P. Guier

Re: Patricia 2.0 - likely the most aggressive chess engine ever made

Post by Damas Clásicas »

I saved some positions where Patricia 2.0 crashed. Patricia was using white pieces in all positions.

Here are some:

3n2rk/pr4p1/1p1B1P1p/3p4/2pP2bq/2P2QR1/P1P4P/5R1K w - - 0 26

3rk2r/pp3ppp/2P5/6q1/2p1p3/1P2P1Pb/P2QBP1P/R4RK1 w k - 0 18

R1bq2k1/4n3/4r1pp/4Q3/3p4/5BP1/5PP1/6K1 w - - 0 61

r3kb1r/pp2pppp/2p2n2/3qQ2P/3P4/2P2b2/PP3PP1/R1B1KB1R w KQkq - 0 13

4Rrk1/6r1/3p1p1p/1p1PpPbQ/3pB3/3P3P/2P5/7K w - - 0 38

2k4r/p2p1Rp1/bp6/2nB2bp/2P5/1P1R2p1/P2B4/6K1 w - - 0 32
Damir
Posts: 2810
Joined: Mon Feb 11, 2008 3:53 pm
Location: Denmark
Full name: Damir Desevac

Re: Patricia 2.0 - likely the most aggressive chess engine ever made

Post by Damir »

If you use large hash tables the engine will fail to load and in some cases to crash. Try and load 512/1024/2048 hash tables...

When I tried loading Patricia first time, I was using 21 GB hash tables. The engine would not load, so I reduced hash to 2 GB and the engine

worked fine after that...
User avatar
Whiskers
Posts: 166
Joined: Tue Jan 31, 2023 4:34 pm
Full name: Adam Kulju

Re: Patricia 2.0 - likely the most aggressive chess engine ever made

Post by Whiskers »

https://github.com/Adam-Kulju/Patricia/ ... /tag/2.0.1
I hammered out a bunch of small bugs, including one which I think was behind the crashes (not sure, because I could never get Patricia to crash on my machine.) It passes valgrind and address sanitizer to high depths; if any problems persist, please make sure to notify me.
User avatar
Whiskers
Posts: 166
Joined: Tue Jan 31, 2023 4:34 pm
Full name: Adam Kulju

Re: Patricia 2.0 - likely the most aggressive chess engine ever made

Post by Whiskers »

Damir wrote: Sat Apr 06, 2024 2:59 pm If you use large hash tables the engine will fail to load and in some cases to crash. Try and load 512/1024/2048 hash tables...

When I tried loading Patricia first time, I was using 21 GB hash tables. The engine would not load, so I reduced hash to 2 GB and the engine

worked fine after that...
This was because of a bug that is now fixed. I don't know how I thought using a regular old int for the TT size would be a good idea (it of course overflows at huge hash sizes).
carldaman
Posts: 2283
Joined: Sat Jun 02, 2012 2:13 am

Re: Patricia 2.0 - likely the most aggressive chess engine ever made

Post by carldaman »

I am also noticing that Patricia 2.0 is laboring to win against engines much lower rated (2400-2650 CCRL) in games played without books. It plays adventurous but dodgy gambits such as the Wing Gambit with discrepancies in its eval. For example, at a time control of 10m +4s, it will play 1. e4 c5 2. b4 with an eval of +1.26, but after 2...cxb4 3. Nf3 it drops to -0.63. That's a huge and abnormal swing this early in the game.

Was the training done with an opening book that skipped thru the first few moves?

I like gambits and attacking chess very much, and Patricia's true strength comes thru later in the middlegame and endgame where it can eventually disentangle and overcome the deficit from the opening against the aforementioned 2400-2650 engine opponents, but the early eval swings and ensuing precarious positions suggest something is off.

I have lots of experience testing the private engine CyberNezh, which was also designed to be an aggressive and optimistic superhuman attacker several years ago, but using hand crafted eval. Nezh also likes to play lots of sacs and gambits, but its early piece/pawn development is much smoother when playing without a book than I'm seeing with Patricia so far.

Don't get me wrong, I salute and support your effort with great excitement - it has tremendous potential! Hope my comments can be helpful. :)
User avatar
Whiskers
Posts: 166
Joined: Tue Jan 31, 2023 4:34 pm
Full name: Adam Kulju

Re: Patricia 2.0 - likely the most aggressive chess engine ever made

Post by Whiskers »

carldaman wrote: Sun Apr 07, 2024 4:19 am I am also noticing that Patricia 2.0 is laboring to win against engines much lower rated (2400-2650 CCRL) in games played without books. It plays adventurous but dodgy gambits such as the Wing Gambit with discrepancies in its eval. For example, at a time control of 10m +4s, it will play 1. e4 c5 2. b4 with an eval of +1.26, but after 2...cxb4 3. Nf3 it drops to -0.63. That's a huge and abnormal swing this early in the game.

Was the training done with an opening book that skipped thru the first few moves?

I like gambits and attacking chess very much, and Patricia's true strength comes thru later in the middlegame and endgame where it can eventually disentangle and overcome the deficit from the opening against the aforementioned 2400-2650 engine opponents, but the early eval swings and ensuing precarious positions suggest something is off.

I have lots of experience testing the private engine CyberNezh, which was also designed to be an aggressive and optimistic superhuman attacker several years ago, but using hand crafted eval. Nezh also likes to play lots of sacs and gambits, but its early piece/pawn development is much smoother when playing without a book than I'm seeing with Patricia so far.

Don't get me wrong, I salute and support your effort with great excitement - it has tremendous potential! Hope my comments can be helpful. :)

That behavior is entirely expected, and is a reason why I said "I need to do eval normalization of some sort to make it useful for analysis". Patricia has multiple bonuses in search for playing sacrifices, that "force" it to think of moves like 2.b4 as better at the root. Once the move is actually played, though, Patricia doesn't get the bonus for playing a sacrifice anymore, because there's no sacrifice to play. The huge eval swing is reflective of the lengths I have gone to force Patricia to think of moves that sacrifice as better :mrgreen:

And yes, I test with a balanced opening book. Engines tend to just play the same openings over and over if you don't. I will say that I tried turning off all sacrifice bonuses when early in a game to prevent it from throwing away material in TOO ridiculous of a fashion, and its only effect was to crash the EAS score, so I dismissed that idea. Maybe it's worth another try.
carldaman
Posts: 2283
Joined: Sat Jun 02, 2012 2:13 am

Re: Patricia 2.0 - likely the most aggressive chess engine ever made

Post by carldaman »

Very interesting! Thanks for the explanation of the strange early eval swings.

So far I'm very impressed by its Houdini*-like ability to come back from the messy positions and material deficits that ensue from such dubious early gambits, with some very deep and resourceful sacrificial combinations in the middlegame (albeit against much weaker opponents)!


*the illusionist named Houdini, not the engine by that name :-)
BrendanJNorman
Posts: 2559
Joined: Mon Feb 08, 2016 12:43 am
Full name: Brendan J Norman

Re: Patricia 2.0 - likely the most aggressive chess engine ever made

Post by BrendanJNorman »

Whiskers wrote: Sun Apr 07, 2024 4:38 am
carldaman wrote: Sun Apr 07, 2024 4:19 am I am also noticing that Patricia 2.0 is laboring to win against engines much lower rated (2400-2650 CCRL) in games played without books. It plays adventurous but dodgy gambits such as the Wing Gambit with discrepancies in its eval. For example, at a time control of 10m +4s, it will play 1. e4 c5 2. b4 with an eval of +1.26, but after 2...cxb4 3. Nf3 it drops to -0.63. That's a huge and abnormal swing this early in the game.

Was the training done with an opening book that skipped thru the first few moves?

I like gambits and attacking chess very much, and Patricia's true strength comes thru later in the middlegame and endgame where it can eventually disentangle and overcome the deficit from the opening against the aforementioned 2400-2650 engine opponents, but the early eval swings and ensuing precarious positions suggest something is off.

I have lots of experience testing the private engine CyberNezh, which was also designed to be an aggressive and optimistic superhuman attacker several years ago, but using hand crafted eval. Nezh also likes to play lots of sacs and gambits, but its early piece/pawn development is much smoother when playing without a book than I'm seeing with Patricia so far.

Don't get me wrong, I salute and support your effort with great excitement - it has tremendous potential! Hope my comments can be helpful. :)

That behavior is entirely expected, and is a reason why I said "I need to do eval normalization of some sort to make it useful for analysis". Patricia has multiple bonuses in search for playing sacrifices, that "force" it to think of moves like 2.b4 as better at the root. Once the move is actually played, though, Patricia doesn't get the bonus for playing a sacrifice anymore, because there's no sacrifice to play. The huge eval swing is reflective of the lengths I have gone to force Patricia to think of moves that sacrifice as better :mrgreen:

And yes, I test with a balanced opening book. Engines tend to just play the same openings over and over if you don't. I will say that I tried turning off all sacrifice bonuses when early in a game to prevent it from throwing away material in TOO ridiculous of a fashion, and its only effect was to crash the EAS score, so I dismissed that idea. Maybe it's worth another try.
Please don't go too far in the "correcting" direction.

I love the way Patricia plays in the opening.

Would love to use a multiPV version to mine for aggressive opening ideas.

Just last night she gave me a great attacking idea in the Karpov variation of the Caro Kann, which I later used to crush a 2300 player (in 17 moves!) with on liChess in the same night.

Such aggressive ideas are often pruned by more "correct" engines. 8-)