Can a Bayesian Spam Filter Play Chess? 204
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."
The point? (Score:1, Insightful)
Wouldn't this be like modifying a Ferrari with off road tires and using it for Baja racing, when you would just be better off buying a truck?
I wish they would focus more on making the spam filter work well, rather than diddling with a chess-bot. I still find important email in my spam folder, while still having spam in my inbox...
Sort of like when I go a new cell phone- the chap at the store told me about all the bells and whistles, whilst all I wanted was a phone that worked as a phone and didn't drop calls....
short answer (Score:2, Insightful)
Now, ask that question again, this time including the word "well".
Re:Results? (Score:2, Insightful)
Re:The point? (Score:1, Insightful)
Finally - news for nerds! (Score:4, Insightful)
Opening (Score:2, Insightful)
A decent lesson in why spam filters don't work (Score:5, Insightful)
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.
Re:Get back to me when I can teach my cat chess (Score:2, Insightful)
the flaw in his teaching: (Score:3, Insightful)
Re:No, it can't (well) (Score:4, Insightful)
No, it won't. This is actually what was done in the article.
The problem is in the length of the sequences. If you could learn sequences of, say, length 60 (for 30-move games), maybe your filter would become a reasonably good player. Unfortunately, the need for computational resources increases exponentially with each extra move added.
The complexity of chess is simply too high to learn this way.
Chess openings might be learned this way, but it is not very useful to do so. The results will be worse than opening libraries, which are very good at the moment.
Great article! (Score:5, Insightful)
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.
Re:A decent lesson in why spam filters don't work (Score:3, Insightful)
I've never really learned any strategies, just the basic rules. So I always end up playing defensively, trying to protect my pieces. Sure, there may be the occasional attack on the opponent, but the underlying strategy is always one of defense. Playing defensively may stay off defeat for some time, if done well, but it will never beat an opponent.
Stone Soup (Score:2, Insightful)
Sure you can make a chess playing program from a spam filter.
You just need to throw in a legal move generator, and a game database, and some capture heuristics, and position displayer, etc, etc...
Re:Results? (Score:3, Insightful)
Except for the fact that the bayesian filter in question was originally designed for identifying spam, this statement is incorrect. Bayesian filters have been applied to chess in a variety of ways, including analyzing move sequences and analyzing the current placement of pieces. In general, the strategic algorithms (that project the game forward) have been better competitors.
Not that chess algorithms do not contain statistics-based procedures, only that ones that also look forward in the game have provided better outcomes.
Re:No, it can't (well) (Score:3, Insightful)
Machine learning, as we know it, involves giving a black box program large amounts of data (in this case sample games) and having that black box "remember" the data. We have given this black box no way to actually "think" about what it has been given. It has no memory that says "controlling a large number of squares is good." Instead, it has a memory saying that "in this specific position, a grandmaster would have moved his pawn forward." This is simply a terrible way to teach a computer chess, and imo until machine learning can be more flexible and "think," it will be useless for things like chess.
Just to clarify, computers *can* beat just about every human chess-player. They just don't use machine learning - instead, they look at every possibile position that can occur from the current position (given time and memory constraints), run a simple program on all the positions to determine which is best (hard-coded by a human, of course) and pick the move that will lead to the best position. Simple and requiring a lot of speed but no "intelligence," this method is perfectly suited to the computers of today.