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."
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.
apterous.org
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.
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.
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!
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.
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.
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.
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.