For those who know stuff about engines

ed1975

This isn't a thread about cheating, lol.

Having played a certain amount of chess against AI opponents, I've noticed certain features and also have some questions I wonder if anyone who knows about engines can answer.

I've seen engines do really weird stuff when set to play around my level (c. 1200). Like literally suddenly giving up a queen for nothing in return, letting a bishop simply hang or moving its king out from behind pawns into the centre of the board. I can believe the hanging bishop, but the other two things I simply don't believe a human player of ~1200 ELO would do.

In a game I played today the engine foresaw a mate-in-2 that I could play, but still let me play it, so I won!

I've also noticed that engines at this level seem to neglect development and delay castling, if at all. Has anyone else noticed these things? I've no experience of playing an engine at a much higher level, so I'm wondering if the engines neglect these things then as well? I assume not.

So my questions are about what the engine will take into account when making an evaluation. When making an evaluation is the engine mainly tactical (they are tactical monsters, after all) or does it also take the following more positional/structual features into account:

- Pawn structure (incl. doubled pawns etc.)
- Development (engines often seem to neglect this at lower levels)
- Opposite-side castling and possible pawn storms

- King safety

- The bishop pair

I realise it must be very hard to get an engine to play "human-like" or to dumb it down to the level of the average patzer like me, but it can behave strangely at times.

Does anyone have any thoughts on the above? Thanks.

 

quadibloc

Chess engines have improved a lot in recent years compared to what chess programs and computers were like perhaps 20 years ago. The basic design of a typical chess program was that it searched a limited number of moves ahead; positions were then evaluated by material and by some simple positional factors that could easily be determined by a computer program - with the positional factors not allowed to outweigh a single pawn, so the computer wouldn't do silly things if the positional program was all wrong.

Because computer programs do look a few moves ahead, the end result is that even if the positional terms in the evaluation function aren't perfect, it will still try to make moves that are in accord with better positional principles than the evaluation function embodies.

To make tactical blunders, this kind of chess program would have to be set to a very low search depth, though, so it sounds like the one you're using does not conform to this usual model.

kramopolis

Leela, LCO

A neural network engine with a low strength version will play a little more like a mediocre human.

What you want to do is use a network ‘weight’ that is low rated.

The ‘weights’ are kind of like versions. Each new version is better than the last.

So you can select a weight around level 10 and it’ll play like a 1500 human.


It’s not going to be perfectly like a human, it’ll still do some lousy stuff but it won’t do stuff like make 3 perfect moves in a row followed by hanging the queen.

Add an opening book but limit its depth to move 3 or 4 and you’ve got a great sparring partner.


Here’s some links to get you started:

http://blog.lczero.org/2018/09/guide-setting-up-leela-on-chess-gui.html?m=1

https://github.com/LeelaChessZero/lc0/wiki

https://www.bhagwad.com/blog/2018/personal/how-to-run-leela-chess-engine-lczero-in-arena-at-a-specific-elo.html/

mgx9600

There are many chess engines (even I wrote one a while back, so add one more : )

Your question is very broad and cannot really be answered because of the so many chess engines (i.e. some will surely consider things others don't).  However, I'll tell you some basic AI principle that is applicable to your type of question so you can understand a possible implementation which should explain the weirdness you observed.

One of the fundamentals in AI is searching. For example, in solving a one-move checkmate, puzzle, I "search" by looking at the legal moves of every one of my pieces. If I were to dumb down my search, then an easy way to do so is to search only 50% of my pieces, and I'll miss the 1-move checkmate 50% of the time.  If the piece choice is random, then I may miss very obvious 1-move mate that looks weird to another chess player (because maybe it happens so frequently so chess players got the pattern hardwired).  However, from the random point of view, that pattern it no different than some exotic en passant checkmate.

Now, I'm not saying all (or even most) chess programs dumb themselves down this way, but this example should show you how you can observe what you've observed.

 

Rasta_Jay

mgx9600 makes alot of sense.. Always wondered why they hang or not recapture so randomly

Chessopera

Many people use engines on online chess. Best way to deal with cheat is to play bullet 3 min chess. Unfortunately, the widespread use of engine by many players on internet has killed online chess.

mgx9600

Actually, blitz and bullet games are best suited for undetected cheating because you don't have to make very good moves to win.  Something like this

https://play.google.com/store/apps/details?id=com.adamtai.analysisboard

is all you need. (I wrote the above app, just for disclosure)

IpswichMatt

The OP is not so much a question about chess engines as about methods for dumbing down chess engines.

In my opinion, some programs are better than other at this. For example, ChessMaster's approach would be to blatantly throw away a piece or two and then play like a GM for the rest of the game. I think this was done by adjusting the piece's values such that some of it's "personalities" would think that a Knight was worth less than a pawn, or a Queen worth less than a Rook etc.

Shredder, on the other hand will sometimes allow you to win a piece or a pawn by a tactic. It will sometimes allow you to check mate it. At the very low levels, it will play like a beginner in the sense that it will often get it's Queen out early and let you chase it around the board whilst you develop pieces.

iemcheeting
There’s an engine called MID does big calcs abd really makes u feel like u suck...
ed1975

Thanks, guys, for your thoughts. That's interesting. I'm especially interested to try the Leela stuff. Will report back when/if I get it working.

Ziryab
Computer chess programmers are not motivated to algorithms for realistic weak play. There’s no money in the enterprise.

Hence, strong engines are “dumbed down” by artificial means, such as those described by mgx9600 and IpswichMatt above.

When I cared to play whole games against a computer several years ago, I found that HIARCS was more realistic than most. Within Chessmasters, some “personalities” were better than others, suggesting that CM programmers found several different ways.

Now, I usually only play set positions against the engine on full strength. Weakened engines have less appeal.
ed1975

Got Leela working under Fritz GUI but it's giving some strange effects. It crashed Shredder GUI and Lucas Chess.

madratter7

What is the issue you are having? I have LC0 working under Fritz and haven't noticed anything wrong, but it isn't one of the engines I use a lot.

ed1975

e.g. strange evaluations like -128 (!) for Black. Fritz just crashed loading it. Strange things in Friend mode. 

Also: it's beating the hell out of my GPU (laptop getting very hot!)

madratter7

It will stress your GPU like crazy. My fan on my desktop comes on quite audibly when it is running. I think I have seen evals like that, but I'm not getting them right now. Here is an example with it running on a position I deliberately setup to be winning but not within the tablebases I have.

null

 

kramopolis

I think the evaluations coming from your GUI will be wrong bc the neural network engines have their own way of evaluating, with % chance of win rather than centipawns

I’d ignore that and just play.

Frying your hardware ... that’s another story.


I’m on an old MacBook running Arena in a 64bit WINE. Not ideal.

I tried compiling it but got errors due to my OS not being recent enough.


I’d love it if someone packaged all this up for users. An IOS app with selectable weights would be fun

madratter7

The evaluations do get turned into centipawns at least in many positions. (See image above). But how I don't know.

ed1975

I've been messing around with some engines provided within Lucas Chess. Some of them seem to be playing - so far - surprisingly human-like even at my level.