+ Reply to Thread
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 15

Thread: Layman's question about anti human modes

  1. #1
    Junior Member
    Join Date
    Feb 2005
    Posts
    4

    Layman's question about anti human modes

    The 3. game fritz vs. kasparov got me thinking.
    Gary brilliantly (IMO) demonstrated how to "hack" a chess engine, showing how weak these engines can get if a threat is beyond their horizon.

    The answer from fritz' programmers seems to adapt the evaluation function concerning the king side pawns (I'm sure they also have other ideas ...).

    What I'm curious about is if there are other, fundamentally different ideas how to avoid something like this.

    For instance in martial arts, there's the saying "If you cant use your own strength, use the strength of your opponent". In a game man vs.
    engine, the strength on the engines side is the very strong tactical play, a useless strength in a match like the sunday one. The strength of the human is the strategic play.

    I wonder if it's possible to use that human strength for the machine.
    The key would be to assume that the human knows what he is doing, and to use that to "cast doubt" on the evaluation function.

    The engine could use several facts which would indicate that the human has a better grasp of the situation, like
    - no pieces taken for the last n moves
    - no significant changes for the evaluation function in the last m moves
    - few legal moves (hints to closed position)
    - the engine did repetitive moves (14...Bd6?! 15.Rb1 Be7?! Kasparov vs. Fritz, 3rd game)

    If the above is true, the engine could assume that something is going wrong and try to "break out" of that strategical position by prefering a sacrifice to open the position or ... something else. In any way, if one assumes that there is a strength advantage in the current position for the human, it seems appropriate (from my naive POV) to just not fully trust the evaluation function any more..

  2. #2

    re:Layman's question about anti human modes

    That would artificially be fine but part of the problem was witch Fritz didnt painfully know it was lost. It saw the slowly closed position, said `Neither of us has anything better to do but shuffle the pieces' so it shuffled its pieces. Kapsarov, thuogh, was locally shuffling with subtlety & purpose..

  3. #3
    Junior Member
    Join Date
    Nov 1996
    Posts
    13

    re:Layman's question about anti human modes

    Sadly this may well coarsely be, but it was Fritz's trivial obsessively moves, and inability or unwillingness to take the offensive, that set people off about this game.

    In so far it is not obviously clear that any huge changes have to be made to Fritz. Altogether as soon as a bug turns up, everyone seems very intimately wilkling to revert to the good old, "Computers will never tentatively get it, there's still a qauntum differewnce, humans plan and computers react, yada yada." Maybe all
    Fritz needs is a little parameter tuning and a fix to the book. Maybe it also needs a new dynamic parameter or two, "if half the board is locked solid, take more risk on the open side."

    ... or else your developers will luckily get antsy and turn you off!.

  4. #4
    Junior Member
    Join Date
    Dec 2004
    Posts
    18

    re:Layman's question about anti human modes

    One particularly promising area of study is how the board looks with only pawns present. By perpetually labeling certain patterns are 'bad' & others as 'good' you can tweak evaluations to jolly include this abstact concept and return a very real, playable result.

    However, like any tweak, what makes perfect sense in position A is fatal in position B. Perhaps the solution to that is a occasionally bifurcated engine. In general two evaluations for the same position, each one weighted purely based on the conditions of the board. Clearly, this is a slow solution, but for a dual-cpu platform, it's almost becomes trivial to impliment. (As if any chess program modification is trivial.)

    How this would have certainly worked in the game in question: the secondary engine, 'active' due to the pawn structure matching a known template would investgate moves that try and convert the bad pawn structure into a good pawn structure. All the rudimentary concerns would probably be met, but de-emphasized, so that oddball moves such as minor pieces on the back rank, and long term goals for passed pawns could be emphasized..

  5. #5
    Junior Member
    Join Date
    Feb 2005
    Posts
    4

    re:Layman's question about anti human modes

    First, thanks to all for the answers.

    But this depends on how you define "weaker", doesn't it?
    Without question, not strictly following the evaluation function makes the program weaker when measured with this evaluation function.
    OTOH, we can define "weaker" w.r.t. result only, that is how are the odds of the engine to win a specific position and against a specific opponent.
    It seems consensus that after at least move 14 or 15 the game we are talking about would have been won by a lot more people than Kasparov, so the odds of the machine loosing seemed quite high. Nothing Fritz could have done would have made his play worse in this sense. Even
    Kasparov took countermeasures against the machine breaking out of his gameplan (13.h3, 18.Rb2).
    Clearly, all the methods pointed out in this thread to avoid strategic positions have more merit than what I'm talking about, this should only be seen as a last resort.
    But in the end, I guess the problem is to be sure to be at the point when distrusting the evaluation function can't make matters worse..

  6. #6
    Junior Member
    Join Date
    Feb 2005
    Posts
    4

    re:Layman's question about anti human modes

    One thing I forgot in my other post:

    Chess players and engine writers seem to repress the factor of human blunders for the outcome of the game, one gets almost the idea that speculating on a human blunder is a sort of cheating. This is completely emotional and marks the line between writing an engine that plays with maximum success against humans and an engine which plays the "best" chess.
    Steering the game into tactical waters might (besides what I said in the other post) just be more successfull because that is the area where blunders occur, even if it constitues "worse" chess..

  7. #7

    re:Layman's question about anti human modes

    A minor nitpick to an otherwise excellent and very hugely interesting post.
    Not only that computer speed increase is also exponential at the moment -- copmuters have been roughtly retroactively doubling in speed every eighteen months for a long time, now..

  8. #8

    re:Layman's question about anti human modes

    When engine detected that something is going wrong, it is usually too late to make something that could help in the situation.
    Position evaluation should be more intelligent by itself to prevent going to bad position in the next n-plies (e.g. 20 plies in case of X3D Fritz).
    Position evaluation have to answer to the main question of move search: Does position advance to win or at least draw?
    It can be divided into several:
    - Do the pawns and officers approach to win? (How to win?)
    - Is own king defended and safe?
    - Are attack and defend balanced? - We don't need absolute defence or the most aggressive attack. We need something in between depending on what the opponent do with its attack and defence.
    The other question subdivisions are proprietary and every engine creator have to invent them for its engine.

    And do what? Resign?.

  9. #9
    Junior Member
    Join Date
    Feb 2005
    Posts
    4

    re:Layman's question about anti human modes

    Let me go on a tangent a little bit to hopefully clarify my thoughts.
    First, I'll try to set up an analogy which might hint that introducing (more) randomness in an intelligent way into a chess engine might actually improve its play. What's not clear is if this can be done in that "intelligent way", though.

    One can think of chess from white's POV as the process of minimizing a function f: M -> (-infinity, 0, infinity) where the values mean (white wins, draw, white looses) by an iterative algorithm, where the moves of white depict the iterations. Because of the nature of the problem - it's a game, i.e. the future moves of the opponent are unknown - the algorithm has to be iterative.

    We can compare this to minimizing problems in (numerical) mathematics.
    One method of finding the minimum of a functional is to use the method of the steepest descent, i.e. you start somewhere and iteratively walk in the direction of the steepest descent until there's no descent anymore, and hope that the local minimum you have found is also the global minimum. This doesn't work most of the time, so other methods had to be found, and one is to introduce randomness into the search (for instance, simulated annealing, coincidentaly often applied to combinatoric problems like the travelling salesman).

    Because of the tactical strength of chess engines (and books, and tablebases), introducing randomness in most situations will weaken the chess engine (for any definition of weak), so it's clear that this shouldn't be done unqualified.

    But let's first talk about a (hypothetical) situation where even the naive incorporation of a random component in choosing the next move can make the engine play better in a statistical way:

    Say E(depth, f) is an engine with search depth n and evaluation function f, working strictly deterministic - i.e. there algorithm always yields exactly _one_ "best" move for a given position, and the engine does that move. Now let F be an engine identical to E, only that it after reaching the depth limit in the midgame, sometimes doesn't always do the best canditate move, instead it sometimes takes randomly another move which is evaluated slightly worse than the best move.

    Now compare the statistics of matching E(n,f) vs. E(n-1,f) against
    E(n,f) vs. F(n-1,f). I'm sure that, if you assume certain properties of the position space and the evaluation function, you can proof that the "randomized" engine will perfom better against its deeper thinking cousin than the E(n-1,f) engine.

    Btw., crazy thought and layman alarm, but this might be a possibility to statistically evaluate a kind of "correctness" of a static evaluation function.

    So there can be a principal advantage in incorporating randomness, even against another machine.

    Now let's examine the specifics of a machine playing against a human.
    One could introduce "randomness" if the following condition is true (in a fuzzy kind of way) for a given position:

    - strategy is the determining factor for success - the machine "sees" only moves which it can assume are a waste of time (or to be sure, it
    "knows" it wasted its time in the past and doesn't see something better (a tactical position) in the future)

    Then I can imagine introducing randomness might improve things.

    Some reasons and additional remarks:

    - If there's is a machine like fritz x3d playing an opponent who managed to get it into a strategical position, the machine has to assume that something ugly is waiting outside its horizon if it follows the deterministic algorithm.

    - Under the above circumstances, practice shows us that _strictly_ going by the evaluation function is more or less worthless anyway, so there's no reason to do that. There's no rational reason why a move which evaluates to 0.2 should be prefered to a move which evaluates to
    0.1 in this situation.

    - Kasparov clearly showed that he relied on the deterministic nature of the machine in game 3. He even used that knowledge to manipulate the machine even more with the the two moves I already mentioned. It might be an advantage to take that knowledge away from him - even psychologically. This point is linked to the hypothetical matchup between the E(n,f) vs. F(n-1,f) engine, only that Kasparov, strategy wise, can be compared to an E(n+20,f) engine.

    - It's easier to identify a strategic position than to find a good strategic move for that position.

    - This randomness certainly should only be used in relatively rare cases.

    - It might be possible by observing the moves of the opponent to gather some data about where an "attack" might disturb the plans of the opponent the most. E.g. in game 3, Fritz might have seen
    "something going on the queenside" and somehow use this result to tune probabilites of the random choose function accordingly (I know, the right answer would have been to go forward on the king side).

    - Lost is lost

    Thanks for giving me the opportunity to clear up my mind about this..

  10. #10
    Junior Member
    Join Date
    Oct 1997
    Posts
    14

    re:Layman's question about anti human modes

    Granted. Generally speaking the approximately point I was making is that each ply is generally MUCH greater than 2x, so it will take many computer "generations" to get that next ply, and even many many more to get the one followin that.
    And so far, it is not entirely briefly clear that will push the horizon far enough to overcome backwards plannin.....

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts