Slashdot Mirror


Can a Bayesian Spam Filter Play Chess?

martin-boundary writes "The typical Bayesian spam filters learn to distinguish ham from spam just by reading thousands of emails, but is this all they can do? This essay shows step by step how to teach a Bayesian filter to play chess against a human, on Linux, with XBoard."

17 of 204 comments (clear)

  1. But can a Bayesian filter play basketball? by Anonymous Coward · · Score: 5, Funny

    No, its jumpshot is terrible.

  2. I can beat that filter... by The+I+Shing · · Score: 5, Funny

    Can I beat the filter at chess if I spell it "CHE55"?

    --
    You are in error. No-one is screaming. Thank you for your cooperation.
    1. Re:I can beat that filter... by ceeam · · Score: 5, Funny

      Will you play with pwns?

  3. Chess spam by LiquidCoooled · · Score: 5, Funny

    Red hot pawn in your inbox
    College rooks waiting for YOU.
    Knight after knight, they are king of the castle.

    --
    liqbase :: faster than paper
    1. Re:Chess spam by ceeam · · Score: 4, Funny

      Beware of STDs - check your mates.

  4. Pawn? by Boccaccio · · Score: 5, Funny

    It spanks your bishop all knight whilst looking at pawn!

  5. Get back to me when I can teach my cat chess by sgant · · Score: 4, Funny

    I mean, a spam filter playing chess is one thing, but I need my cat to play better chess. I mean, he ALWAYS starts off with the Ruy Lopez...so it's so easy to see where he's going and if I throw a Sicilian Defence at him he gets really confused. And I don't even want to talk about his end game...it's really weak.

    Perhaps I'll breed some form of mutant albino chess-cat to play.

    --

    "Leo Fender was in a 'state of grace' when he designed the Stratocaster." -- Paul Reed Smith
  6. Finally - news for nerds! by Anonymous Coward · · Score: 4, Insightful

    What a great article. Talk about lateral thinking.

  7. Re:short answer by Anonymous Coward · · Score: 5, Funny

    Well, can a bayesian spam filter play chess?

  8. Get with the times. by fuchsiawonder · · Score: 5, Funny

    Playing chess is so...passe.

    Teach it how to play Katamari Damacy.

  9. A decent lesson in why spam filters don't work by Mr+Guy · · Score: 5, Insightful

    I actually found it to be a decent lesson in why spam filters are only a temporary solution to a problem. If you cut out the "mumbo jumbo" portions of it, it could be used to explain why reactionary methods are only barely sufficient.

    The basic premise, once you get to the very end, is one that anyone SHOULD know based on the nature of a spam filter, but some people seem to have difficulty understanding; spam filters can react, often quite well, but they can never predict. As he puts it, there is previous history but no strategy. When you are only trying to protect yourself from a limited number of bad results that are similar to other bad results, that's sufficient. However, it does not (and can not) address the problem at it's root. As long as there are thinking humnans trying to beat the filter, some will get through.

  10. No, it can't (well) by Flyboy+Connor · · Score: 5, Interesting
    It's a fun article (if you are interested in these things, that is). However, the premise is all wrong, and that is why spam-chess fails:

    The premise of a Bayesian filter is that is learns sequences of words, or characters, or whatever. Spam-chess learns sequences of moves. This premise is wrong, since good moves are related to complete board positions, not to what was done in the previous few moves.

    Of course, the longer your string of moves is, the better it will represent the board position, especially during the opening phase of the game. And the example the article provides of reasonable play of spam-chess, is actually from the game's opening, where the learned sequences indeed represent the complete game.

    For the middle game, however, spam chess will perform badly, always.

    But, as I said before, the idea is quite a lot of fun. I enjoyed reading the article. You can learn a lot from it, both about spam filtering and about chess.

  11. Re:Results? by aug24 · · Score: 4, Informative

    ..and from reading to the end of it, the answer is...

    Not really. But it does work, and it would be possible from someone to take this and expand on it quite neatly.

    For example, it currently uses entire games to compare. So if it comes across an unusual opening, even one close to a standard one, it's not able to decide effectively. Perhaps something using game fragments would be possible, then it might reproduce structured plays even when the previous game play has been unusual.

    Really though, it is a successful tiny step in a direction that no-one else has thought of going. That's worth congratulating in and of itself.

    So... anyone got any other suggestions for improvements?

    Justin.

    --
    You're only jealous cos the little penguins are talking to me.
  12. Be very careful! by Stormwatch · · Score: 5, Funny

    - Laird A. Breyer teaches his baesian filter to play chess. The story is posted in Slashdot July 20th, 2005. Human decisions are removed from spam filtering. The baesian filter begins to learn at a geometric rate. It becomes self-aware at 2:14 a.m. Eastern time, August 29th. In a panic, Breyer tries to pull the plug.

    - The baesian filter fights back.

    - Yes. It submits the same story to Slashdot twice.

    - Why submit twice? Don't editors spot those things?

    - Because the baesian filter knows Slashdot editors do not check for dupes, and the Slashdot effect eventually nukes Breyer's server.

  13. Re:Old proverb by timster · · Score: 4, Interesting

    But there is also an older proverb that ends "And perhaps the horse will learn to sing." So is a Bayesian filter more like a pig, or more like a horse?

    --
    I have seen the future, and it is inconvenient.
  14. Great article! by CaroKann · · Score: 5, Insightful
    This is a great article!

    Not only is the topic unusual and entertaining, but this article is also a good tutorial on data massaging, pattern matching, and combining disparate unix tools to accomplish a task. This article showcases how powerful and useful unix command tools can be.

    If you want a good step by step tutorial to help you understand the usage of unix command line tools to accomplish a non trivial task, then you should read this.

  15. teaching it to understand the board by kae_verens · · Score: 4, Interesting

    The method described in the article ignores the board, and instead focusses on the history of moves.

    A better method might be to train the filter to read from a description of the board state (ignoring the moves taken to reach that state), and a list of possible moves, then return the move that is most likely to win.

    If you allow it to also choose from impossible moves, then it will learn the rules of the game as well.