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."

10 of 204 comments (clear)

  1. Results? by mistersooreams · · Score: 3, Interesting

    I scrolled through the first 11 pages of this article before getting bored. Do they ever tell us how good the player ended up being? It's an interesting idea but I can't see it challenging even a beginner.

  2. Re:The point? by Steinfiend · · Score: 2, Interesting

    You must be new here right? Things like this get done because somebody wondered whether it would be possible. They now know, yes it is possible. So a Chess playing Bayesian filter isn't necessarily 100% useful now, but what they learned from doing it might be able to be applied in some other situation. Maybe they can reapply whatever they learned back into spam filtering and improve all of our in-boxes.

  3. 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.

  4. Pie in the sky by kronocide · · Score: 3, Interesting

    After having played with different statistical, Markov, and network algorithms to try to teach programs to do complex things like topic-classify texts, I have learned that it mostly doesn't work.

    It makes sense. If something so utterly trivial (compared to the human brain) as a spam filter could learn do something as complex as play chess (well), then our brain would be a whole lot smaller. Nature doesn't waste resources.

    But hey, it might always make an interesting screen saver!

  5. Re:A poor reinvention of the wheel..... by hey! · · Score: 2, Interesting

    Reminds me of an old Ted Nelson anecdote, about a high school student who figured out how to interface a computer to eeg signals so he could type, after a fashion, using only his brain. His teacher told him it was worthless because he could type with his fingers faster than that.

    --
    Post may contain irony: discontinue use if experiencing mood swings, nausea or elevated blood pressure.
  6. 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.
  7. 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.

    1. Re:teaching it to understand the board by anaesthetica · · Score: 2, Interesting
      Yes, but if it only learns from sets of possible moves, won't the filter never pick an impossible move? If you only feed in actual games, in which the players stuck to the rules, the filter ought to do the same, in theory, without "knowing" the rules.

      What would be more interesting, would be to feed in all of the known openings and closings that have been analyzed and collected over the years (comprehensive books on openings run over 750 pages in length). If you could teach it various openings, and then the various defenses to each opening, it might be a lot stronger than simply teaching it by random examples of past games.

  8. Re:Be very careful! by Fweeky · · Score: 2, Interesting
    I started work on a bayes filter to detect duplicates articles a few days ago actually, but got sidetracked and it ended up detecting TV show genres from titles. Seriously:
    Training the bayes classifier: 4950/5000 (99.00%)
    Enter a title to classify: Babylon 5
    Sci-fi = -5.1525
    Enter a title to classify: Simpsons
    Cartoons = -3.9344
    I'll try to concentrate more next time ;)
  9. Re:But can a Bayesian filter play basketball? by Anonymous Coward · · Score: 2, Interesting

    Perhaps a Bayesian filter could be taught to do basic HR functions as well. When it saw a written question with particular configuration of words it could be taught to respond with a company policy statement or an maybe an uplifting quote from a management book.

    Think of the money that could saved by replacing the humans that presently presently do the same.