Predicting a humans move

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

Moderator: Ras

User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: Predicting a humans move

Post by Don »

carldaman wrote:
Don wrote:I hear you, but I have been doing this a very long time and have a good sense of what is reasonable.

The idea of finding a great move has proved to take everything we have, fast computers and powerful hardware. All resource devoted to playing a really good move. Now which do you think is easier to do, find a great move or find a great move that has all sorts of mine-fields built into it? So you are trying to solve a problem that is even harder to solve than just playing strong chess.

---

There are other things you can do too. With the correct adjustments to the evaluation we can make Komodo play on the "other side" of soundness. For example if we lower the value of a pawn we can make the program quite willing to sacrifice pawns at the drop of a hat. You can also lower the value of the rook to make the program willing to make exchange sacrifices. If you want the program to really play wild and crazy you can lower the value of ALL the pieces and pawns so that positional factors dominate.

Robert Flesher published modified settings for Zappa Mexico II (dubbed the 'Dissident Aggressor" that make Zappa play in a crazy, but very effective style, but at the expense of being about 400-500 rating points weaker. However, since Zappa is quite strong (close to 3000 on CCRL 40/40, running on 4 cores), subtracting all those points still leaves us with a 2500 rated attacking monster that even destroys not only strong human players, but also 'weaker' engines below 2500 CCRL elo. It is also a great analysis/preparation tool.

This is very significant, since it did not involve any actual code changes, but only tweaking of parameters. It's interesting that Robert actually lowered the value of the pieces, and not the pawns, to get Zappa to be very willing to sacrifice material.
Once in a while, Zappa Aggressor will lose to a lower rated player, having run out of pieces and pawns to throw away, but most of the time its risky play is very effective and the (strong) opponent will be overwhelmed by the complications. This works as intended, and shows it's far from an impossible task to achieve an effective aggressive style.
For the record I never claimed otherwise. I even believe you can achieve and aggressive style without weakening the program a some of the top programs are much more aggressive than others.

What is very difficult is to create a program that can reliably swindle the opponent when losing by deliberately playing an inferior move while knowing that this move gives the best chances by some undefined measurement.

Or similarly to know how to play second best moves in general which gives better winning chances and increases the strength of the program. That is how I understood the question and subsequent clarification. If the goal is to just produce a weaker program with a more exciting playing style, I concede the point. I have no doubt that this is possible.



I've been able to get similar results with other engines, such as Little Goliath Evolution, by tweaking its parameters to get it to play very risky, but yet strong chess (at around 2200-2300 level strength which is quite acceptable as sparring partner for a club player).

There are other examples -- Pawel Koziol has also worked hard to implement a swindle mode and various weaker personalities in his engines. I think he will admit it's not easy to do this (especially a swindle mode that works properly). Thinker is another engine that tries to use risky tactics in its Active personality. And then JB Nielsen's current work and enthusiasm with Dabbaba must be commended as well.

Regards,
CL
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.
carldaman
Posts: 2287
Joined: Sat Jun 02, 2012 2:13 am

Re: Predicting a humans move

Post by carldaman »

Don wrote: For the record I never claimed otherwise. I even believe you can achieve and aggressive style without weakening the program a some of the top programs are much more aggressive than others.

What is very difficult is to create a program that can reliably swindle the opponent when losing by deliberately playing an inferior move while knowing that this move gives the best chances by some undefined measurement.

Or similarly to know how to play second best moves in general which gives better winning chances and increases the strength of the program. That is how I understood the question and subsequent clarification. If the goal is to just produce a weaker program with a more exciting playing style, I concede the point. I have no doubt that this is possible.

To play challenging second-best moves that actually increase the chances of winning should no doubt involve very sophisticated yet-to-developed algorithms, which is not a trivial matter. It's hard to dispute that.

My contention has been that too many developers are unwilling to trade strength for style (even if they can still have the strong version of their program left unaffected!) by creating a weaker but more aggressive engine personality, or by at least providing the tweakable parameters allowing testers and end-users to experiment themselves. This is far more achievable. In a commercial program, this could even be marketable.

Robert Houdart was going to release a tweakable version of Houdini, and I hope he does eventually, but I hope it allows more than just tweaking for strength. Rather, tweaking for style should be just as much of an objective!

I know many engines have some of these parameters, but among the top ones only Zappa's could allow the necessary freedom and scope to achieve a radical departure from the original style of the engine.

I'd like to see a talented developer take hold of Ippolit or Stockfish and do a "number" on it, and be willing to sacrifice strength for style, instead of creating yet another derivative. Maybe Robert Vida, if he has the time and inclination could take Critter back in the direction of the more attractive Critter 0.90 style. Just an example.

This is not addressed at any developer in particular. I understand some have worked for many years to increase the strength and wish to continue to do so. Some even are within striking distance of the #1 spot in the world and that's a goal certainly worth pursuing (example=Komodo). But I hope someone who clearly is not about to claim the top spot any time soon can take hold of this vision and use their skills to aim for something different, that can be uniquely valuable to the community in its own way.

I often hear programmers grumble that they added such and such knowledge into their engine, but then it only slowed it down and weakened it, and so on, but for a 2600-2700 engine my reaction would be "So what? The engine is still strong, isn't it? and it can now be a much more useful sparring and analysis partner because of the extra knowledge, etc. Most don't see it this way. Too many are desperate to only gain rating points, even if they're hundreds and hundreds of points away from the top.

I know if I had an engine that was rated anywhere around or above 2600-2700, I'd work hard to add as much knowledge into it as possible, and then also to give it the ability to play very risky and provocative chess (at the user's option), and would not care if my engine ended up being "only" 2400 strong in the end, as a result of my changes. Far from feeling like I failed, I'd feel a very strong sense of accomplishment.

-- A paradox worth embracing IMHO,
CL
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: Predicting a humans move

Post by Don »

carldaman wrote:
Don wrote: For the record I never claimed otherwise. I even believe you can achieve and aggressive style without weakening the program a some of the top programs are much more aggressive than others.

What is very difficult is to create a program that can reliably swindle the opponent when losing by deliberately playing an inferior move while knowing that this move gives the best chances by some undefined measurement.

Or similarly to know how to play second best moves in general which gives better winning chances and increases the strength of the program. That is how I understood the question and subsequent clarification. If the goal is to just produce a weaker program with a more exciting playing style, I concede the point. I have no doubt that this is possible.

To play challenging second-best moves that actually increase the chances of winning should no doubt involve very sophisticated yet-to-developed algorithms, which is not a trivial matter. It's hard to dispute that.

My contention has been that too many developers are unwilling to trade strength for style (even if they can still have the strong version of their program left unaffected!) by creating a weaker but more aggressive engine personality, or by at least providing the tweakable parameters allowing testers and end-users to experiment themselves. This is far more achievable. In a commercial program, this could even be marketable.

Robert Houdart was going to release a tweakable version of Houdini, and I hope he does eventually, but I hope it allows more than just tweaking for strength. Rather, tweaking for style should be just as much of an objective!

I know many engines have some of these parameters, but among the top ones only Zappa's could allow the necessary freedom and scope to achieve a radical departure from the original style of the engine.

I'd like to see a talented developer take hold of Ippolit or Stockfish and do a "number" on it, and be willing to sacrifice strength for style, instead of creating yet another derivative. Maybe Robert Vida, if he has the time and inclination could take Critter back in the direction of the more attractive Critter 0.90 style. Just an example.

This is not addressed at any developer in particular. I understand some have worked for many years to increase the strength and wish to continue to do so. Some even are within striking distance of the #1 spot in the world and that's a goal certainly worth pursuing (example=Komodo). But I hope someone who clearly is not about to claim the top spot any time soon can take hold of this vision and use their skills to aim for something different, that can be uniquely valuable to the community in its own way.

I often hear programmers grumble that they added such and such knowledge into their engine, but then it only slowed it down and weakened it, and so on, but for a 2600-2700 engine my reaction would be "So what? The engine is still strong, isn't it? and it can now be a much more useful sparring and analysis partner because of the extra knowledge, etc. Most don't see it this way. Too many are desperate to only gain rating points, even if they're hundreds and hundreds of points away from the top.

I know if I had an engine that was rated anywhere around or above 2600-2700, I'd work hard to add as much knowledge into it as possible, and then also to give it the ability to play very risky and provocative chess (at the user's option), and would not care if my engine ended up being "only" 2400 strong in the end, as a result of my changes. Far from feeling like I failed, I'd feel a very strong sense of accomplishment.

-- A paradox worth embracing IMHO,
CL
With Komodo we purposely set out to produce a program that would impress people with a strong positional style of chess and natural human-like play. That is our vision for Komodo.

Having an unsound coffeehouse style of play is a perfectly valid vision too, it's just not OUR vision for Komodo.
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.
carldaman
Posts: 2287
Joined: Sat Jun 02, 2012 2:13 am

Re: Predicting a humans move

Post by carldaman »

Don wrote:
With Komodo we purposely set out to produce a program that would impress people with a strong positional style of chess and natural human-like play. That is our vision for Komodo.

Having an unsound coffeehouse style of play is a perfectly valid vision too, it's just not OUR vision for Komodo.
Don,
That's fair enough and makes a lot of sense as I noted in the previous post. Komodo is a very reliable analysis partner and it would be awesome if it becomes #1. My post was not necessarily directed at you, even though I replied to you to further the discussion.

It may likely make more sense for someone who has lesser ambitions, but is nonetheless very skilled and devoted to chess programming, to aim for such a secondary objective. I hope the discussion in this thread may spur someone else on in this regard. It would be much better to see an original coffeehouse champ than yet another cloning attempt.
:-)

Regards,
CL
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: Predicting a humans move

Post by Don »

carldaman wrote:
Don wrote:
With Komodo we purposely set out to produce a program that would impress people with a strong positional style of chess and natural human-like play. That is our vision for Komodo.

Having an unsound coffeehouse style of play is a perfectly valid vision too, it's just not OUR vision for Komodo.
Don,
That's fair enough and makes a lot of sense as I noted in the previous post. Komodo is a very reliable analysis partner and it would be awesome if it becomes #1. My post was not necessarily directed at you, even though I replied to you to further the discussion.

It may likely make more sense for someone who has lesser ambitions, but is nonetheless very skilled and devoted to chess programming, to aim for such a secondary objective. I hope the discussion in this thread may spur someone else on in this regard. It would be much better to see an original coffeehouse champ than yet another cloning attempt.
:-)
Agreed 100%

Regards,
CL
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.
JBNielsen
Posts: 267
Joined: Thu Jul 07, 2011 10:31 pm
Location: Denmark

Re: Predicting a humans move

Post by JBNielsen »

Don wrote:I hear you, but I have been doing this a very long time and have a good sense of what is reasonable.

The idea of finding a great move has proved to take everything we have, fast computers and powerful hardware. All resource devoted to playing a really good move. Now which do you think is easier to do, find a great move or find a great move that has all sorts of mine-fields built into it? So you are trying to solve a problem that is even harder to solve than just playing strong chess.

If you are looking for ways to play weaker chess while playing in a style unrecognizable from weak humans, then there are some possibilities and even some papers written on it. So there is a lot of room for experimentation.

There was a computer/computer game played a few decades ago where the computer seemed to blunder a queen outright in what appeared to be a winning position. The position was very interesting because it turned out the computer was actually getting mated and the queen giveaway was just a horizon (delaying) move. But what was also interesting is that no human would have given away the game because the mate was far from obvious. If you are going to lose the game anyway, why make it obvious to the other player?

So there are all sort of hacks possible to deal with these things. What was suggested here was a simple hack, if you see you are getting checkmated or losing huge material and you suddenly change the move you are playing at the same time, just revert to the move you were going to play before you saw the big loss and hope your opponent doesn't see the problem.

Another hack, if your goal is to make it tricky for the opponent is to favor positions with lots of legal moves. You can do that with asymmetrical evaluation, such as giving just the computers side a bonus based on total mobility.

If you want to make a tricky player you can do a special analysis which involves searches to find positions where the opponent has many reasonable moves that are wrong. Reasonable on low depths, wrong on high depths. Such a player might be a real hoot to play, but the overhead of doing such stuff results in far weaker play. But that would be ok if the goal was to produce an extremely interesting player or to simulate one of those players every club has, the hack who loves sacrificial play and doesn't care if it's not quite sound or not.

There are other things you can do too. With the correct adjustments to the evaluation we can make Komodo play on the "other side" of soundness. For example if we lower the value of a pawn we can make the program quite willing to sacrifice pawns at the drop of a hat. You can also lower the value of the rook to make the program willing to make exchange sacrifices. If you want the program to really play wild and crazy you can lower the value of ALL the pieces and pawns so that positional factors dominate.

Thanks for summing up all the tricks and hacks we already have.

I know what chessposition you refer to.
If I remember right, it is so old that the russian program Kaissa was involved.

Some 25 years ago I saw something similar in the german magazine Computer, Schach & Spiele.
An author showed a diagram with a poor move by a chesscomputer.
He hoped the error would be corrected in the future.
If he had let the computer respond to his 'correct' move he had got a nice surprise.
And avoided his own error with his writing.

It is nice to see that you, Carl and I all agree that it is possible to make an engine playing with traps with a rating of 2000+ (that is how I read your post).
This rating is in play with humans; it should not make traps against other engines.

This would be of good use for chessplayers in the rating range 1300-2100.
I will assume 80% of all chess-software is bought by this group.
So perhaps there is money in offering the first program with traps.

How do we continue from here?

I suggest we start a new topic in the 'Programming and Technical Discussions' part
Subject: Brainstorm: How do we program traps for humans into engines?
We limit it to the top of the searchtree:
ply 1 - choose one of the next best moves to make a trap
ply 2 - the opponent goes into the trap
ply 3 - a surprising move is played so the score is increased
(like my -,Nd7!? Ne2??,Ne5! example)

I doubt that programming traps into an existing program can be done, so it simply can be turned on by a parameter when it plays against humans.
But the future may show...

My own Dabbaba has only a rating of 2000.
(it does an iterative search, but it does not make internal iterations which may be needed)
So it is not likely I try this myself.
But if I programmed traps into it, it could at least be used by weaker players or for annotations if it was allowed more time.

Hopefully a lot of ideas would appear in such a new topic.
Also from those who don't want to program this themselves.
If we find a good solution, someone with a 2500-program may be inspired to realise this.

And who knows....
Perhaps it can be expanded with traps deeper in the tree.
Perhaps it can be optimized to challenge IM's or GM's.

It should certainly be able to produce annotations like
"Avoiding the trap xxx? yyy!"
"White could have tried the trap xxx!? yyy? zzz!"


By the way...
Has anyone tried to analyse how Magnus Carlsen outplays the worlds best players?
Does he play more like a computer than the other players?
Or does he make subtle (positional?!) traps?
Better opening preparations?
Or something else...
Perhaps he doesn't know himself?!
JBNielsen
Posts: 267
Joined: Thu Jul 07, 2011 10:31 pm
Location: Denmark

Re: Predicting a humans move

Post by JBNielsen »

carldaman wrote:Excellent post, Jens! :) You've perfectly articulated a synthesis of the things discussed here earlier in the year, and then some.. I think the developer community needs to not lose sight of these factors. It's not something that even has to interfere with the (legitimate) aim creating the strongest possible engine, as this can be achieved separately and is not mutually-exclusive in an absolute sense.

Weaker engine personalities can be great tools for the club player if they can come up with (sometimes risky) ideas that are hard to refute over-the-board. Often the 'best' move is the one most challenging/difficult to the opponent, even if not technically the best (since it would require 3000+ strength to refute it.) This is in line with how Lasker and a young Tal, plus many other greats played.

I like to analyze with the Zappa Aggressor personality, and also like to use an engine like Hannibal, to come up with interesting and playable ideas, besides using Komodo, Houdini, Hiarcs etc.

"Dubious, therefore playable" is a humorous but profound saying by GM Tartakower.

Regards,
CL
Thanks for your nice words and for joining this topic with a lot of your good input!

best, jens
carldaman
Posts: 2287
Joined: Sat Jun 02, 2012 2:13 am

Re: Predicting a humans move

Post by carldaman »

JBNielsen wrote:
carldaman wrote:
"Dubious, therefore playable" is a humorous but profound saying by GM Tartakower.

Regards,
CL
Thanks for your nice words and for joining this topic with a lot of your good input!

best, jens
Thanks Jens, let's hope others are willing to contribute something substantial to this whole subject.

PS. Another well-known programmer who was among the first to introduce anti-human concepts into his engine's play is Ed Schroeder, with his Anti-GM function in Rebel and various engine personalities in ProDeo, his latest effort. Then there was Christophe Theron and GambitTiger, which featured strong anti-human play.

CL