Tord Romstad wrote:The last few days, I've been working on the most important missing feature in my chess program: Adjustable playing strength. Strange though it might seem, making my program play very badly is by far the most difficult and frustrating thing I have attempted to do in computer chess, and I am now close to giving up in despair.
At ratings above 2200, I achieve limited strength simply by reducing the speed of calculation. This works fairly well, as one would expect. Below 2200, I try to emulate typical human blunders and tactical mistakes. This is where the problems begin. My approach seems very reasonable to me: I just prune random moves everywhere in the tree, and the probability that a move is pruned depends on how hard the move would be to see for a human player. Underpromotions and moves with negative SEE value are pruned with very high probability, long diagonal moves also have quite high probability, obvious recaptures have very low probability of being pruned, and so on. Finally, the frequency of pruning of course depends on the playing strength.
Tuning this turned out to be much trickier than I thought. I used TSCP as my sparring partner. The simple task of adjusting the blunder frequency so that my program scored somewhere above 0% and below 100% took a lot of time. After days of work, I finally began to hit close to the mark. I managed to find various settings which scored around 10%, 25%, 50%, 75% and 90% against TSCP. I was also quite pleased with the look of the games: Glaurung played positionally stronger than TSCP, but lost by making quite human-looking blunders. Many of the games looked almost like I would expect a game between TSCP and a similarly rated human to look.
Proud and happy with my work, I started an account on the ICC last night, in order to test against human players. I started with the settings which scored 50% against TSCP, which I thought (based on the WBEC ratings) should have a strength around 1700. At this level, the programs plays positionally ugly chess, and makes plenty of tactical blunders, but rarely hangs a piece, or misses to capture a hanging piece. The result was terribly disappointing: Glaurung played about a dozen games against players around 1900-2100, and won all games except for a single draw. Apparently, 2000 rated players on the ICC make elementary tactical blunders all the time.
I then adjusted the rating down to 1300, and tried again. At this level, the program drops a piece about once or twice per game, on average (at blitz time controls). It turned out that this hardly made any difference: Glaurung still scored close to 100%. Glaurung was frequently hanging pieces, but half the time the human opponents didn't see it, and half the time they quickly paid back the favor by blundering a piece themselves. With a blitz rating of around 2200, I gave up in disgust, logged off and went to bed.
Today, I logged on with the strength set to 1000 -- the lowest implemented level, which scores 0% against TSCP. Glaurung makes several horrible blunders in every single games. It is painful to watch, and it is difficult to imagine how it is possible to play much weaker without playing completely random moves. To my immense frustration, Glaurung still wins most of its games. The current blitz rating, after 37 games, is 2098.
How is this possible? TSCP is rated around 1700, and even when I make my program weak enough to lose every single game against TSCP, it still wins easily against most human players on the ICC. Are the ICC ratings 1000 points too high, or something? How do I manage to lose against average human players, without playing completely random moves?
I'm not sure what the purpose of this post is, apart from venting my frustration, but any advice about how to achieve weak, but realistic-looking play by a computer program would be welcome.
Tord
1)Tscp is clearly better than 2000 at blitz.
2)I think that you are wrong if you assume that humans are positionally better than computers.
Here is an example of positional error that cannot happen to computers and happened to me in my last tournament game(90+30 time control).
In my last tournament game I simply did not pay attention to the fact that the opponent has a passed pawn and I considered the pawn d4 as a weak pawn when it is both weak pawn and passed pawn.
position is equal but I evaluated black as better because I did not see that d4 is a passed pawn and only some moves later in the game I suddenly saw that d4 is a passed pawn.
Analysis shows that this did not cause me to make mistakes in the relevant game(I made mistakes because of different reasons) but this type of mistake can also cause positional mistakes.
[d]r2r2k1/pp3pp1/4bn1p/3q4/2pP4/6NP/PPBQ1PP1/3RR1K1 b - - 0 1
Analysis by Rybka 2.3.2a 32-bit :
20...Qd5-b5 21.Ng3-e4
= (0.00) Depth: 5 00:00:00
20...Qd5-b5 21.Ng3-e4 Nf6xe4
= (-0.06) Depth: 6 00:00:00 7kN
20...Qd5-b5 21.Ng3-e4 Nf6xe4 22.Bc2xe4 Rd8-d7
= (0.06) Depth: 7 00:00:00 10kN
20...Qd5-b5 21.Ng3-e4 Nf6xe4 22.Bc2xe4 Rd8-d7 23.Qd2-c3
= (0.01) Depth: 8 00:00:00 26kN
20...Qd5-b5 21.Ng3-e4 Nf6xe4 22.Bc2xe4 Be6-d5 23.Be4xd5 Rd8xd5 24.Re1-e7 Ra8-e8
= (0.05) Depth: 9 00:00:00 44kN
20...Qd5-b5 21.Re1-e5 Nf6-d5 22.Bc2-e4 Qb5-b6 23.Ng3-f5 Nd5-f6
= (0.07) Depth: 10 00:00:03 225kN
20...Qd5-c6 21.Ng3-e2 Nf6-d5 22.Ne2-f4 Rd8-e8 23.Re1-e5 f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