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

204 comments

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

    No, its jumpshot is terrible.

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

  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?

    2. Re:I can beat that filter... by morgan_greywolf · · Score: 1

      Yeah, that filter'll never figure out where you K1N6 is...

    3. Re:I can beat that filter... by MyLongNickName · · Score: 0

      Crap... descriptive notation is a pain for ME to read. Give me algebraic any day ;)

      --
      See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
    4. Re:I can beat that filter... by Anonymous Coward · · Score: 0

      Can I beat the filter at spam if I spell it "ENLARG3 Y0UR PAWNS!" ?

    5. Re:I can beat that filter... by Anonymous Coward · · Score: 0

      I think you missed the joke...

    6. Re:I can beat that filter... by MyLongNickName · · Score: 0

      And i think you missed mine....... ;)

      --
      See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
    7. Re:I can beat that filter... by CapnGrunge · · Score: 1

      What if you turn a pwn into a k-vv 3e n?

      --
      I see 57005 people
    8. Re:I can beat that filter... by iignotus · · Score: 1

      You can keep playing as long as you don't get r00ked.

    9. Re:I can beat that filter... by Anonymous Coward · · Score: 0

      No - I prefer algebraic notation too, but that is irrelevant to the joke, i.e. K1N6 = King...

    10. Re:I can beat that filter... by arodland · · Score: 1

      I absolutely love the sig. I can't stand the way slashdot assumes that anyone who's actually a decent typist must be a bot. Sometimes you know exactly what you want to say and it's ready to go -- but slashdot isn't ready for you :)

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

    1. Re:Results? by MyLongNickName · · Score: 1, Insightful

      Who cares? It is kinda cool someone even thought of this. Methinks you need to review the definition of "nerd".

      --
      See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
    2. Re:Results? by aug24 · · Score: 2, Informative
      I got to the page before the answer to your question before the slashdotting hit.

      Gaaah! Google's cache doesn't have that onepage!

      For all the others, try here

      J.

      --
      You're only jealous cos the little penguins are talking to me.
    3. Re:Results? by flamearrows · · Score: 1

      It plays chess as well as you'd expect an extensively modified spam filter to - mediocre, with the occasional flash of insight. It might be interesting to feed it a greater amount of games in the hope of obtaining more sophisticated sequences, but ultimately the skill will be undermined by the nature of the program. Still interesting...

      --
      The indiscriminate use of vulgar language is the linguistic crutch of the inarticulate motherfucker
    4. 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.
    5. Re:Results? by mrthoughtful · · Score: 1

      Basically, yes, but not so well.

      It would never get to beat modern computer chess programs, as it depends upon a database of previous games that are similar to the current game played, and has no scope for examining possible futures.

      A graylist approach could prevent unwanted chess players, by identifying those gamers willing to stick around for a retry.

      --
      This comment was written with the intention to opt out of advertising.
    6. Re:Results? by Slinky+Saves+the+Wor · · Score: 1

      I read through the first 10 words of your post before getting bored. Do you ever tell us what you wanted to say or ask? :)

      Yes, the chess guy does say how good it ended up, in a way. He talks about it holding up to a three year old, but I guess that's just a small joke. I bet with some really beginner types (like myself) the system would actually win games.

      What I found really interesting is the sort of "subconscious" which was built in through the adding of randomness. You get all these ideas and reject the bad ones. The process happens all the time. It sounds like something called "creativity".

      --
      I do not moderate.
    7. Re:Results? by bill0755 · · Score: 1

      If the games used for teaching had sequences similar to the game you play, the next move would have been learned. Whether it was a good move or not would depend on what it was taught. The Bayesian method can only learn by by imitation.
      --
      By three methods we may learn wisdom: First, by reflection, which is noblest; Second, by imitation, which is easiest; and third by experience, which is the bitterest. - Confucius

    8. Re:Results? by stienman · · Score: 1

      "It's time to conclude this investigation and see what we've learned. The original question was "Can a spam filter play chess?". Clearly, the answer to this is yes, but making it play well is not so easy."

      -Adam

    9. Re:Results? by Photar · · Score: 1

      TFA says is plays like a 3 year old.

      --
      He who knows not and knows he knows not is a wise man. He who knows not and knows not he knows not is a fool.
    10. Re:Results? by N3Roaster · · Score: 1

      I've got one. I read somewhere that high level chess players don't view the current game state so much in terms of exactly where each piece is, but in terms of piece groupings. I'm more of a go player myself, but it seems like that would probably be right. Perhaps a richer yet more abstract structure representing game state would be better. In this way, situations where the structure of play dynamics are the same even while the key pieces are in different positions could be picked up on. This combined with your game fragment notion would probably allow the chess filter to learn much faster.

      --
      Remember RFC 873!
    11. Re:Results? by aug24 · · Score: 1

      Ah, yes, two tier analysis. Pick the best possible resultant grouping, then the best move to achieve that grouping (as there are prolly several).

      Obviously taking/checking will require different analyses, but then we are getting away from the simple bayesian approach.

      J.

      --
      You're only jealous cos the little penguins are talking to me.
    12. Re:Results? by Anonymous Coward · · Score: 0

      People have been using machine learning to play board games for awhile now. This is not different than just using a bayesian classifier itself, except the implementation is a little more limitted since it was designed for text data.

      It will show signs of "intelligence" of course. It's training off of intelligence and just trying to copy it. Making a few moves that seem to know what is going on is not saying anything. Machine learning always seems to show intelligence for a few moves and then fails unless it is one of the best implementations.

    13. Re:Results? by Chuckstar · · Score: 2, Insightful

      "it is a successful tiny step in a direction that no-one else has thought of going"

      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.

    14. Re:Results? by Anonymous Coward · · Score: 0

      Today, chess.

      Tomorrow - machine self-awareness!

      hrm, skynet began as a spam-filter?

    15. Re:Results? by pclminion · · Score: 1
      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.

      I'm sure people have thought of it before, but they haven't done it because it's clear that it can't work unless it's given an infinite context of moves. Otherwise, you can set the computer up to fail by creating a situation near the beginning of the midgame and then playing out a line that traps the computer as soon as it runs out of context.

      It is also limited to what it learns by "observing" other games. So it can never move creatively or unexpectedly.

      It's an interesting thing to play with, to be sure, but it's never going to rise to the level of other systems.

    16. Re:Results? by Gulik · · Score: 1

      Do they ever tell us how good the player ended up being?

      Dude -- they taught a mail filter to play chess. "It doesn't matter if the bear dances well or not, it's that he dances at all."

    17. Re:Results? by Shalda · · Score: 1

      Well, I did write a chess program that learns from experiance. I used a rather simple chess engine that could play a full game against itself in about 7 seconds. All it did was log board conditions and the result of the games where that position was played and fed that back into its decision making. I never did get all the bugs out (it had a problem with draws), but it was a fun project to work on. As you might expect, it was weakest in the middle game.

    18. Re:Results? by e133tc1pher · · Score: 1

      I think you're referring to this http://www.chessgames.com/perl/fischerandom

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

    2. Re:Chess spam by ballstothat · · Score: 1
      What about:

      "Drag Queens... or are they? Click to find out!"

      --
      10
      20 Print "Balls To That"
    3. Re:Chess spam by macserv · · Score: 1

      Wouldn't that be "RED HOT PW4N"?

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

    It spanks your bishop all knight whilst looking at pawn!

    1. Re:Pawn? by anaesthetica · · Score: 3, Funny
      In Korea: only old people spank their bishops all knight while rooking at pawn.

      See? By making fun of other people's pronunciation of English, you can fit yet another chess piece in...

    2. Re:Pawn? by mvdw · · Score: 1

      In Korea: only old queens spank their bishops all knight while rooking at pawn.

  6. 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
    1. Re:Get back to me when I can teach my cat chess by iamdrscience · · Score: 1, Insightful

      What do you expect, your cat is an idiot! I bet your cat can't even read!

    2. Re:Get back to me when I can teach my cat chess by Anonymous Coward · · Score: 0

      Heeheh... there's a humourous SF story out there (without checking I think it's by Charles Harness) about a guy who trains his pet white rat to play chess; it ambles about the board, sniffs the pieces and drags the pieces it wants to move. It learns to play about as well as the average player at his local chess club....
      The funny part is that he suggests to the local chess club that they enter it in a tournament, they rubbish the suggestion, as the rat isn't anywhere near good enough... completely ignoring the aspect of ITS A F****** RAT!!! PLAYING CHESS!!!

    3. Re:Get back to me when I can teach my cat chess by Matthaeus · · Score: 1

      But does the cat have an MSCE?

    4. Re:Get back to me when I can teach my cat chess by Slicebo · · Score: 1

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

      Won't it always have to play white?

  7. The point? by Alex+P+Keaton+in+da · · Score: 1, Insightful

    What is the point of this? Why modify something to do something at a sub par level when one can just design something to do the job well.... (I know the answers- to see if it can be done, to have fun etc.... but still, why?)
    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....

    --
    And All I Ask is a Tall Ship And a Star to Steer Her By
    1. Re:The point? by Anonymous Coward · · Score: 1, Insightful

      I believe the answer is "Because he can".

    2. Re:The point? by tomstdenis · · Score: 0

      Want less spam? Stop assuming emails are coming from humans who take the time to write them.

      Hashcash proxy. Nuff said.

      tom

      --
      Someday, I'll have a real sig.
    3. Re:The point? by poopooboi · · Score: 1

      but still, why?

      Well ... to see if it can be done, to have fun, etc.

      I wish they would focus more on making the spam filter work well, rather than diddling with a chess-bot.

      Who are "they"? And since when have they been working for you?

    4. Re:The point? by MyLongNickName · · Score: 1

      Because he is a geek. It is fun to hack things like this. It is more a mental puzzle type thing than practical. Of course, if I have to explain it, you ain't gonna get it.

      --
      See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
    5. Re:The point? by Anonymous Coward · · Score: 0

      Why modify instead of building anew? Because sometimes things end up working better than anyone expected.

      http://www.qv500.com/porsche959p2.php

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

    7. Re:The point? by squiggleslash · · Score: 0
      Please, for the love of God, don't ever post to Slashdot again. This is a website for people who find "geek stuff" interesting. That means people using technology in odd and wonderful ways. We don't care if it's useful, we care if it's interesting.

      Take you fat, pointy-haired self, off this website, and go study for your MBA or something.

      --
      You are not alone. This is not normal. None of this is normal.
    8. Re:The point? by Breakfast+Pants · · Score: 0

      "I wish they would focus more on making the spam filter work well, rather than diddling with a chess-bot."

      And I wish instead of posting to slashdot you would spend more time working on cold fusion. Sorry, you don't get to dictate what others do, nor do you get to dictate what is interesting to them.

      --

      --

      WHO ATE MY BREAKFAST PANTS?
    9. Re:The point? by StupidStan · · Score: 0
      Why modify something to do something at a sub par level when one can just design something to do the job well.... (I know the answers- to see if it can be done, to have fun etc.... but still, why?)

      ...this is the dumbest thing I have ever read

    10. Re:The point? by jacksonj04 · · Score: 1

      Because seeing if you can do something often aids other things. For example, if this could be used to teach a filter how the player reacts to *its* moves, it may then be able to be used in spam filters to go "Well, old spam looked like *this*, and in the past it changed like *this* every 2 months, so new spam should start to look like *this*".

      --
      How many people can read hex if only you and dead people can read hex?
    11. Re:The point? by orasio · · Score: 2, Informative

      Bayesian filters are not spam filters.
      Spam filters are a good tool used to filter spam.
      I agree with you that spam filters need to improve, including others tools _in_addition_to_ bayesian filters.

      Nevertheless, seeing that bayesian filters are just a tool used in spam filters, your claims are nonsensical. Bayesian filters existed before spam filters, and they have lots of applications. In fact, this is not the first time a bayesian filter is applied to chess.

      Bayesian filters are good at anything that requires automatic learning (kind of a self-evolving AI), that only needs a measure of success and failure to mold its behaviour.
      Chess is even better suited than spam, because you don't need a user to tell the filter whether it succeeded in playing a match, like it happens with spam filtering.

    12. Re:The point? by kryten_nl · · Score: 1

      When you're done with that Ferrari, I'd love to see the result....

      --
      For the perfect anti-Unix, write an OS that thinks it knows what you're doing better than you do and let it be wrong.
    13. Re:The point? by Mxx0r · · Score: 1

      AI is a rather new science. The current models for doing anything (chess included) aren't very good. Sure, we can beat Kasparov (sp?) but what it comes down to is enumerating every possible move available and the responses to those moves, and so on. At a game like go, even a novice human player can beat the most advanced computer. A step in any direction (even a poor step) may open up new possibilities that are unavailable with the way we use/make AI now.

    14. Re:The point? by Anonymous Coward · · Score: 0

      Fat, pointy haired self? That shows great intellect... Hey, i don't agree with you, so you must be fat, or gay, or maybe I slept with your mom!!!!
      You got beat up in middle school, and then high school, and college, and hey, likely you get beat up now when you go to bars....
      Wow, you are just a loser!!! I bet you never get laid! I bet you have no friends!!! I bet you ar a low-middle manager type with some crappy 10 year old imported car and you wear cheap, crappy clothes. Insult someone for an MBA, wow, that makes sense. I am sure you are jealous of the MBAs you work with who aren't losers like you... You feel better than them, even though they are better than you in every way.... ha!

  8. Would you like to play a game? by Anonymous Coward · · Score: 1, Funny

    How about a nice game of chess?

    1. Re:Would you like to play a game? by MichaelSmith · · Score: 1
      How about a nice game of chess?

      I suppose this is the reason for this experiment: is a Bayesian filter some kind of universal AI? If I train a filter to emulate my slashdot posts will it be as intelligent (or not) as me?

    2. Re:Would you like to play a game? by MyLongNickName · · Score: 0

      Second rule of Slashdot: Never leave yourself that open.

      --
      See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
    3. Re:Would you like to play a game? by zerojoker · · Score: 1

      No, I'm sure. I'd rather like to play "Global thermonuclear war".

    4. Re:Would you like to play a game? by mikiN · · Score: 1

      Which Side Do You Want?

      --
      The Hacker's Guide To The Kernel: Don't panic()!
    5. Re:Would you like to play a game? by MyLongNickName · · Score: 1

      Newbie... it would be 1. ... h8xe1

      --
      See my journal for slashdot ID's by year. Mine created in 2005. http://slashdot.org/journal/289875/slashdot-ids-by-year
    6. Re:Would you like to play a game? by FhnuZoag · · Score: 1

      USSR.

      Nuke Redmond, please.

    7. Re:Would you like to play a game? by HybridST · · Score: 1

      The side that lives!!!

      --
      Ever notice that Cobra Commander sounds an awful lot like Star scream?
  9. short answer by aendeuryu · · Score: 2, Insightful

    The short answer is "yes".

    Now, ask that question again, this time including the word "well".

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

      Well, can a bayesian spam filter play chess?

    2. Re:short answer by digidave · · Score: 1

      Then it would suck at Chess960

      --
      The global economy is a great thing until you feel it locally.
    3. Re:short answer by khellendros1984 · · Score: 1

      So....could we get the Bayesian filter to play "Global nuclear war"??

      I for one welcome our chess-playing nuke-hurling Bayesian overlords!

      --
      It is pitch black. You are likely to be eaten by a grue.
  10. Spam Filter by rollonet · · Score: 1

    Gee, I wonder if it could beat Deep Thought :) (http://www.research.ibm.com/deepblue/)

    1. Re:Spam Filter by wild_berry · · Score: 1

      Deep Thought is crap at chess. It outputs all of its moves in simple notation: "42".

    2. Re:Spam Filter by $RANDOMLUSER · · Score: 1

      Too bad the mods missed this. Funny.

      --
      No folly is more costly than the folly of intolerant idealism. - Winston Churchill
    3. Re:Spam Filter by maxwell+demon · · Score: 1

      You misunderstand. You should look up game #42 in the appropriately sorted list of all possible games. It is the game where both parties choose the best move each time.

      --
      The Tao of math: The numbers you can count are not the real numbers.
  11. A poor reinvention of the wheel..... by Arkaic · · Score: 0

    This is a just rehash of what most top level chess programs already do via the use of databases built on previous games. They determine how effective a move from a previous game may have been based on the percentage of times it resulted in a win/loss/draw for the previous player.

    1. 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.
    2. Re:A poor reinvention of the wheel..... by Anonymous Coward · · Score: 0

      So what, the question was if a spam filter could play chess. I'm pretty sure real chess progeams don't use actual spam filters.

    3. Re:A poor reinvention of the wheel..... by kae_verens · · Score: 1

      and what if you had no fingers, or you have nerve damage that made typing difficult?

    4. Re:A poor reinvention of the wheel..... by KD5YPT · · Score: 1

      I think the parent's point is being ironic. Similar to the case with UPS, whose founder got a C- for a college paper on a business of overnight shipping as being costly and impossible.

      --
      In US, you can easily buy enough major firearms to wipe out your neighbourhood but a few little fireworks are banned.
    5. Re:A poor reinvention of the wheel..... by Anonymous Coward · · Score: 0

      I work for UPS, and the founder did not come-up with the idea of starting a shipping company until long after he graduated college. Where to people come-up with these bold-face lies?

      > overnight shipping as being costly and impossible.

      That was the conventional wisdom until FedEx got into the market. Their founder came-up with the idea while in college, and was laughed at by a professor for mentioning the idea.

  12. Finally - news for nerds! by Anonymous Coward · · Score: 4, Insightful

    What a great article. Talk about lateral thinking.

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

    Playing chess is so...passe.

    Teach it how to play Katamari Damacy.

    1. Re:Get with the times. by GMFTatsujin · · Score: 2

      You mean "passant," don't you?

    2. Re:Get with the times. by MilenCent · · Score: 1

      You laugh, but....

      At the end of the sequel (currently only out in Japan) there is the special Rose Level. In it, with no time limit, the player must collect one million roses in sets of one and ten that slowly regenerate. Only roses can be picked up on this level, and the ball never grows in size. (You can stop and save your progress at any time, however.)

      After about two hours of play, I've finally broken 30,000. Some people on the Gamefaqs message boards have gotten to a million, however, by tying rubber bands around the control sticks and leaving their PS2 running for days, a sure but inefficent process.

      A Katamari bot would work wonders on this level.

  14. Opening by Chris_Mir · · Score: 2, Insightful

    I can imagine, depending on how many games are played and the available memory space, that it will develop to have a decent opening. But nothing more then that.

    1. Re:Opening by aug24 · · Score: 1

      Absolutely, because it is effectively playing with complete games in order to do well, which is equivalent to making a tree of every possible chess move from the start - a rather big data set.

      J>

      --
      You're only jealous cos the little penguins are talking to me.
    2. Re:Opening by Jarnis · · Score: 1

      'a rather big data set'. You, sir, are a master of understatement...

  15. Spam filter has a lot of tricks up its sleeve by Anonymous Coward · · Score: 0

    You would not believe how many pawns fall into the Nigerian scam trap, and how many bishops actually fall pray to C1ALIIS spams.

  16. I need funding by TedRiot · · Score: 1

    for an experiment with 1000 bayesian that build a culture and make /. welcome our new bayesian overlords.

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

    1. Re:A decent lesson in why spam filters don't work by cyber0ne · · Score: 2, Insightful

      To illustrate your point full-circle, the reason why current spam filtering will never "win" is the same reason why I suck at chess.

      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.

      --
      http://publicvoidlife.blogspot.com
    2. Re:A decent lesson in why spam filters don't work by Anonymous Coward · · Score: 0

      That's why we have guns. And mincers. Large mincers.

    3. Re:A decent lesson in why spam filters don't work by TheLink · · Score: 1

      Uh. Spam filters do work.

      It's because spammers are targeting stupid/ignorant people, and they're not going to bother with the extra effort required to get past half-decent spam filters of a few people, who won't be buying their stuff anyway.

      Beating good or even average chess players is quite a big difference from detecting spam aimed at stupid/ignorant people.

      So far my spam filters are working pretty well enough, and I haven't trained them for months. In fact I had to roll back some training (go back to older version) when it turned out to make it worse.

      --
    4. Re:A decent lesson in why spam filters don't work by kencurry · · Score: 1

      Playing defensively may stay off defeat for some time, if done well, but it will never beat an opponent.

      But, in pro sports that play multi-game series, defense wins championships. I think this is because defense can benefit from design or study, while offense is more based on intangibles.

      --
      sigs are for losers (except to point out that sigs are for losers)
  18. Can't be that good by Pedrito · · Score: 1

    SpamBayes definitely reduces the spam count, but a human could definitely do a lot better (though a bit slower). If it can't learn to play chess better than it filter's e-mail, it probably wouldn't be much of a match.

    1. Re:Can't be that good by Mr.+Underbridge · · Score: 1
      SpamBayes definitely reduces the spam count, but a human could definitely do a lot better (though a bit slower). If it can't learn to play chess better than it filter's e-mail, it probably wouldn't be much of a match.

      And if you can hire someone to filter your mail for you, that's great. Otherwise, hang on to your Bayesian and/or heuristic based filter.

    2. Re:Can't be that good by Pedrito · · Score: 1

      I think you guys are misunderstanding me. I'm not complaining that it can't do better than a person. I'm simply saying, your average idiot can sort e-mail better than a bayesian filter, so I'd suspect it's not going to be able to play chess any better than your average idiot. That's all.

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

    1. Re:No, it can't (well) by panda · · Score: 1, Redundant

      Ah ha! But what if you do to the chess-bayes what you do with your spam-bayes?

      Bayesian spam filters are not particularly smart at telling the difference between spam and ham until trained. That's why the directions for spamassassin and most other bayesian filters recommend that you have it learn from some saved spam and ham messages before putting the filter into production use. When that is done, the filter starts out being somewhat trained and does a much better job from the start.

      I'll wager that if you ran through a set of games, say from a collection of books on championship chess, then the bayesian filter would eventually learn to play like a grandmaster. At least as far as the traditional chess canon is concerned. Make random moves against it, and it will be totally confused.

      --
      Just be sure to wear the gold uniform when you beam down -- you know what happens when you wear the red one.
    2. Re:No, it can't (well) by Flyboy+Connor · · Score: 3, Insightful
      I'll wager that if you ran through a set of games, say from a collection of books on championship chess, then the bayesian filter would eventually learn to play like a grandmaster.

      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.

    3. Re:No, it can't (well) by m50d · · Score: 1

      How about applying it differently, getting it to learn to pick a move for each position? Obviously that's a little harder than a simple spam/not spam judgement, but I'd have thought you could get it to recognise that if there are 3 pawns in front of the king and you have a rook available you can do a back rank mate, etc.

      --
      I am trolling
    4. Re:No, it can't (well) by Anonymous Coward · · Score: 0

      It will be no better than a simple opening book.

    5. Re:No, it can't (well) by afinn · · Score: 1
      No, It wouldn't. Chess is a much more complex task than spam filtering.


      A baysian filter does not learn sequences. Spam filtering is a binary classification task. You give it message and the task is to decide whether that message is spam or not spam. This is based on a bunch of pre-defined features - usually the words that occur in the text - and the probabilities of those features turning up in spam vs. non spam.


      Playing chess is not something that you can naturally represent as a binary classification task. Any approach that attempts to represent playing chess in this way is going to perform poorly.

    6. Re:No, it can't (well) by Intron · · Score: 1

      One of the early AIs got good at checkers in this way. It was given a lot of patterns and based on playing many games created weights for moves based on what patterns it recognized. I believe it could beat the best human players. Chess would have a much larger number of patterns, because of the different types of pieces and moves, but in principal, I think you are right.

      --
      Intron: the portion of DNA which expresses nothing useful.
    7. Re:No, it can't (well) by ant_slayer · · Score: 1

      What do you mean the premise is all wrong? A couple quotes from the article:

      ---
      " The original question was "Can a spam filter play chess?". Clearly, the answer to this is yes, but making it play well is not so easy."

      "Perhaps most interestingly overall, it should be remembered that dbacl doesn't think ahead like most chess engines do. Its successes and failures are almost entirely based on the historical record of the game as it develops and mimicry of training games, not at all on calculating moves and countermoves in the future."
      ---

      It seems to me that the author addresses this issue directly. I.e., the premise is fine -- he taught a bayesian filter to play chess, but not well, and the reason it sucks is because it only plays with history (no prediction).

      -Ant Slayer-

    8. Re:No, it can't (well) by Flyboy+Connor · · Score: 1
      " The original question was "Can a spam filter play chess?". Clearly, the answer to this is yes, but making it play well is not so easy."

      It depends what you mean by "playing chess". Can a monkey play chess? If you let the monkey move pieces at random, and the board simply disallows illegal moves, is the monkey playing chess? If you say "yes", then sure, the spam-chess engine can play chess. But then anything that can move pieces can play chess. True, spam-chess plays a little better than random moves, that's why I said it can't play *well* -- and it NEVER will play well. But it is also true that the author compares his engine with the play of a three-year-old. However, the implication that the spam-chess engine might someday play a good game of chess is wrong.

      "Perhaps most interestingly overall, it should be remembered that dbacl doesn't think ahead like most chess engines do. Its successes and failures are almost entirely based on the historical record of the game as it develops and mimicry of training games, not at all on calculating moves and countermoves in the future."

      That's not novel. The first good checkers-playing program used learned patterns. NeuroGo plays a reasonable game of Go simply by having a Neural Network assign a weight to each board position when the current board is the input. Pattern matching is pretty common in boardgame-playing programs. The main difference between all these programs and spam-chess is that spam-chess learns move-sequences, not board-positions. And move sequences are pretty useless, because they provide little information on the board position if the sequence in not of sufficient length. And the computational requirements of move sequences of sufficient length are simply too high to ever solve the problem.

      It seems to me that the author addresses this issue directly. I.e., the premise is fine -- he taught a bayesian filter to play chess, but not well, and the reason it sucks is because it only plays with history (no prediction).

      The spam-chess-engine doesn't recognise illegal moves by itself, so does it play chess? Doesn't it leave the chess playing up to the separate interface which disallows illegal moves? And the author DOES use prediction: he predicts the next move from the move sequence. True, he is not using minimax to analyse the board position, but he doesn't need to: basically, the move sequence gives the same value a minimax searcher based on move sequences would return.

      Anyway, as I said, the article is fun. It just doesn't describe a useful approach to chess-playing.

    9. Re:No, it can't (well) by Flyboy+Connor · · Score: 1
      A baysian filter does not learn sequences.

      That, however, is the way it is used in the article.

      Playing chess is not something that you can naturally represent as a binary classification task. Any approach that attempts to represent playing chess in this way is going to perform poorly.

      Bayesian filtering for spam is not by definition binary classification. True, the end result is "spam" or "not spam", but what it does is calculating how likely a message is to be spam. Then, if the likelihood is above 90%, for instance, the message gets classified as spam, and otherwise not.

      Chess playing can easily be represented as an evaluation task: that is actually how most chess programs are written. The engine has an evaluation algorithm that assigns a board position a value that represents the chance of winning in that position. A minimax algorithm then searches for the best move based on the evaluation of play sequences from the current board position.

      The problem with this algorithm, however, is that it doesn't evaluate board positions. And if you don't do that, there is little reason to suppose that the program will generate good moves, except for maybe the opening moves.

    10. Re:No, it can't (well) by rm999 · · Score: 2, Insightful

      You are completely correct. Chess is a very, very complicated game to teach to a computer and has resisted all our current machine-learning methods. The reason is simple - current machine learning is not flexible (invariant). This means that if you teach it how to play in a given position, it will not be able to extrapolate what it learned and apply that knowledge to a similar but different position.

      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.

    11. Re:No, it can't (well) by DrEasy · · Score: 1

      Agreed. One thing the author could have tried is to play his program against one that simply picks one move randomly amongst the available ones, and see if his program at least beats the random program consistently. I'm not even sure that it would be the case. Until he does the above: if he claims his program can play chess then he should also admit that the random program can do too.

      --
      "In our tactical decisions, we are operating contrary to our strategic interest."
    12. Re:No, it can't (well) by barawn · · Score: 1
      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.


      But this problem is easily fixed - instead of giving spam-chess the move sequence, give it the board state as a function of move number. You could easily write a program which does this from the games.

      I'm not sure that this is the limitation, though. For one thing, if you play as if board state is the only thing that matters, then you're completely ignoring playing style of the person you're playing. A move sequence contains more information than the board state, not less. So in theory, you may be able to play better, not worse. Of course, this is in theory - in practice it does mean the signal/noise of the data is lower.

      I think the main limitation - not being able to understand values of exchanges - is probably the biggest problem. It's also the easiest to fix, as you can just write a program to add the piece that's being taken (i.e. instead of Bxc4, you'd have BxBc4). The relative value of each piece can be determined just from the number of times an exchange happens for winners.
  20. 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!

    1. Re:Pie in the sky by Vo0k · · Score: 1

      Well, that can mean some more things:
      - our mind is inadequately built for chess. Just like playing tunes using a floppy drive requires way more programming than playing them using the sound card + speakers. Does the size and complexity of a program to play tunes using the floppy mean that playing audio is so difficult or just that floppy is an inadequate device?
      - The spam filter is a really smart program that can build a great database out of available data. Take a few gigabytes of data (human DNA), add an uninhabited environment and in some time you have a civilisation. It doesn't mean data for all that was built was stored in the startup DNA. Just that it had good growth potential.
      - That chess is far easier than topic-classifying texts (definitely you operate on a way smaller set of elements, so for a machine it definitely may be easier)
      - That you simply failed to find the right way to make a program to classify texts. Poor skill, or plain dumb bad luck.
      - That Nature doesn't waste resources on such useless things as perfecting your ability to play chess, and instead focuses on more important stuff, using up as much resources as needed for them (well, that's rewording of the first point)

      --
      Anagram("United States of America") == "Dine out, taste a Mac, fries"
    2. Re:Pie in the sky by nautae · · Score: 1

      Nature doesn't waste resources

      Ah, but many of the features of human intelligence (e.g., symbolic reasoning) are relatively new features, and haven't been fully optimized yet.

    3. Re:Pie in the sky by kronocide · · Score: 1

      Yes, I suppose all those explanations are possible. Just a few comments:

      Just like playing tunes using a floppy drive requires way more programming than playing them using the sound card + speakers. Does the size and complexity of a program to play tunes using the floppy mean that playing audio is so difficult or just that floppy is an inadequate device?

      Interesting parallel. However, I don't think it really takes less programming to play music on the sound card, it's just that most of the programming is invisible to the ordinary "user." It may in fact contain more programming, it's just there in the device already. But I think the point is correct. Deep Blue beats most humans at chess and it's certainly a lot simpler than a brain, so specialization could work.

      The spam filter is a really smart program that can build a great database out of available data. Take a few gigabytes of data (human DNA), add an uninhabited environment and in some time you have a civilisation. It doesn't mean data for all that was built was stored in the startup DNA. Just that it had good growth potential.

      This seems to be the premise we all start from. The problem is that it's an over-simplification. We tend to discover after much trial and error that the data doesn't have the required properties to be sortable or distinguishable in the right ways, or that over time strange statistical artifacts emerge, or that the amount of data required to build a useable model is simply unachievable and impossible to work with. But I get your point, it's certainly a logical possibility.

  21. How's about replacing the /. "editors"? by Moderation+abuser · · Score: 0, Offtopic

    I mean, the editors bsically just categorise articles as worth posting to the main page, that could be done automatically and probably with a higher duplicate detection ratio.

    --
    Government of the people, by corporate executives, for corporate profits.
  22. Heheheh by kronocide · · Score: 0

    Good one.

    1. Re:Heheheh by kronocide · · Score: 0, Offtopic

      So I get downmoderated because I want to give some positive feedback but don't have any modpoints? Gee, thanks.

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

    1. Re:Be very careful! by LS · · Score: 1

      OH MY GOD!!! You inadvertantly just proposed a solution to the dupe problem! Slashcode needs a baesian filter to check for dupes. Wouldn't this be the perfect application for this? Also, couldn't baesian filters be used for things like checking a bug database for dupes as well?

      LS

      --
      There is a fine line between being a cultivated citizen and being someone else's crop. - A. J. Patrick Liszkie
    2. 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 ;)
  24. I, for one... by Anonymous Coward · · Score: 0

    ...welcome our new chess-playing spamfilter overlords!

  25. Old proverb by StrawberryFrog · · Score: 3, Funny

    An old proverb comes to mind: Never try to teach a pig to sing. It wastes your time and annoys the pig

    --

    My Karma: ran over your Dogma
    StrawberryFrog

    1. 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.
    2. Re:Old proverb by Anonymous Coward · · Score: 0

      Well, since we're talking about spam, I would guess that it would be closer to a pig!

    3. Re:Old proverb by wed128 · · Score: 1

      Spam is close to a pig, but not too close...i'm pretty sure a pig could eat it without being cannibalistic...

    4. Re:Old proverb by grammar+fascist · · Score: 1

      Never try to teach a pig to sing. It wastes your time and annoys the pig

      Pragmatists. Sheesh.

      The thing is, in the process, you might learn some valuable things about yourself, the pig, and music.

      --
      I got my Linux laptop at System76.
    5. Re:Old proverb by AntsInMyPants · · Score: 1

      Perhaps we could build a baysian filter that takes in baysian filters and sorts them into pig and horse?

    6. Re:Old proverb by Boronx · · Score: 1

      Yeah, but the guy in that proverb was under a deferred death sentence. If your life may depend on teaching a Bayesian filter how to play chess, then it could be worth a shot.

  26. Yes it can, as well as Deep Thought by Arthur+B. · · Score: 0

    Because it is Turing complete...

    --
    \u262D = \u5350
    1. Re:Yes it can, as well as Deep Thought by guitaristx · · Score: 1

      Are you sure about that? It's got infinite memory? Man, computing must've advanced quite a lot since I went to bed last night.

      Technically, nothing is "Turing-complete". A Turing machine has a tape of infinite length extending in two directions. However, if you discount that (which is always what happens when someone refers to anything in RL as Turing-complete) then you're right - they're both "Turing-complete".

      --
      I pity the foo that isn't metasyntactic
    2. Re:Yes it can, as well as Deep Thought by Anonymous Coward · · Score: 0

      Naieve Bayes systems do not define a turing-complete language. Not the least of which is because their internal memory is not only finite in actuality, but is finite in *theory*.

  27. hmmm, by DrSkwid · · Score: 1, Funny

    in korea only old people play chess

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    1. Re:hmmm, by maxwell+demon · · Score: 1
      in korea only old people play chess

      In Soviet Russia, chess plays you.
      Imagine a Beowulf cluster of chess-playing spam filters.
      1. Train a spam filter to play chess. 2. ??? 3. Profit!
      But does a bayesian spam filter run Linux?

      Did I forget any?
      --
      The Tao of math: The numbers you can count are not the real numbers.
    2. Re:hmmm, by DrSkwid · · Score: 1

      > Did I forget any?

      yep

      --
      There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
    3. Re:hmmm, by the+phantom · · Score: 1

      Indeed... I saw no references to hot grits, or Natalie Portman, just to mention the first two that come to mind.

  28. Can it..... by ForumTroll · · Score: 1

    filter my mail while I'm playing chess or is it one or the other?

    --
    "A Lisp programmer knows the value of everything, but the cost of nothing." - Alan Perlis
  29. the flaw in his teaching: by wormuniverse · · Score: 3, Insightful

    the author should have the spam filter analyze the games in reverse (from victory to beginning). that would probably produce better results. of course the spam filter would need to handle more than 7 moves out.

    1. Re:the flaw in his teaching: by Intron · · Score: 1

      So you are suggesting that it base its next move on the moves that come later in the game? Or did you not understand what "Bayesian" means?

      --
      Intron: the portion of DNA which expresses nothing useful.
  30. 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.

    1. Re:Great article! by Scarblac · · Score: 1

      Blah, anyone named CaroKann will be biased towards chess articles :-)

      --
      I believe posters are recognized by their sig. So I made one.
  31. Re:Spam Filter (if you'd RTFA) by tessonec · · Score: 1

    Just in the very first page of TFA http://dbacl.sourceforge.net/spam_chess-1.html is the answer to your question (for short, the answer is No:

    Let's put down some ground rules: This experiment will test a real spam filter, not a specially designed chess program. It won't aim to beat Deep Thought (I wouldn't know where to start, and I have a feeling this could be difficult anyway ;-), but it will aim to show signs of "intelligence", or we won't claim success. Finally, since dry tables and graphs are no fun, a theoretical proof of concept is not enough: the spam filter must really play chess in a way that everyone can see, and try out at home.

  32. 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 SimilarityEngine · · Score: 1

      Agreed. There is no way the spam filter is maintaining any kind of useful internal representation of the board state - you can bet your life that it will suggest moves from a given position differently depending on the sequence of moves that led there.

      --
      Those who can make you believe absurdities can make you commit atrocities. - Voltaire
    2. 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.

    3. Re:teaching it to understand the board by KD5YPT · · Score: 1

      Actually, that's possible. Mainly...

      1. Generate every possible state for a board to be in.
      2. Traverse every state pass and assign which response to give when a certain state for a win condition.

      This could actually "prove" whether chess has a proven solution (just like tic-tac-toe is proven to be always a draw game when played correctly).

      --
      In US, you can easily buy enough major firearms to wipe out your neighbourhood but a few little fireworks are banned.
    4. Re:teaching it to understand the board by vidarh · · Score: 1

      Only if the training data contains games where the players makes different moves from the same board state depending on history. In which case it may make sense - I'd expect a lot of humans to reveal more of their strategy from the recent history of moves than from the exact current state.

    5. Re:teaching it to understand the board by SimilarityEngine · · Score: 1

      Interesting point. I guess the training data is quite likely to contain examples of this kind, especially in the early stages of the game, because it is possible in chess to "transpose" from one opening to another.

      The spam filter chess program is interesting in this respect, as you say: it will take into account the game history - effectively being influenced by its opponent's psychology, to some degree. I'm not aware of any other chess program that does this (disclaimer: I don't play chess against computers very often!). But should a good player be thrown by this kind of situation, or should s/he purely consider the best move from this position?

      --
      Those who can make you believe absurdities can make you commit atrocities. - Voltaire
    6. Re:teaching it to understand the board by SimilarityEngine · · Score: 1

      I was so impressed by this idea that I wrote something quickly to do exactly what you suggested. I've set it running, and I'll let you know the answer just as soon as it has finished.... ;^)

      --
      Those who can make you believe absurdities can make you commit atrocities. - Voltaire
    7. Re:teaching it to understand the board by Anonymous Coward · · Score: 0

      Fortunately there are an infinite amount (in practical terms) of positions in chess so you can simply forget that idea

    8. Re:teaching it to understand the board by wizarddc · · Score: 1

      I think the main issue is computing time. If it calculated by board position, it only has to look at one variable condition. If it goes by moves, the longer the game goes, the more computation that needs to be done. If you use the board method, you can also teach the software what are legal moves. I don't think that's such a big issue.

      --
      Th
    9. Re:teaching it to understand the board by OneDeeTenTee · · Score: 1

      Fortunately there are an infinite amount (in practical terms) of positions in chess so you can simply forget that idea

      Fortunately hard drive space is cheap so he can easily add more as needed.

      If he can build a good local index of the game positions he can even use the Gmail filesystem thingy for free storage. The speed would be rather lethargic though.

      --
      Stop the world; I need to get off.
  33. problem building dbacl by rayde · · Score: 0, Offtopic
    when trying to build using the command:
    ./configure && make && make check
    i end up with this error (after much other output):
    /home/------/junk/chess/dbacl/src/lex.yy.c:1269: undefined reference to `yywrap'collect2: ld returned 1 exit status
    make[3]: *** [bayesol] Error 1
    make[3]: Leaving directory `/home/------/junk/chess/dbacl/src'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/home/------/junk/chess/dbacl/src'
    make[1]: *** [all-recursive-am] Error 2
    make[1]: Leaving directory `/home/------/junk/chess/dbacl/src'
    make: *** [all-recursive] Error 1
    anyone with a clue know what's wrong?
    1. Re:problem building dbacl by Intron · · Score: 2, Informative

      yywrap is the ouput of the parser generator (lex or yacc or something). Its either not being generated or missing from the link command. Look through the output of configure and make to be sure you didn't get an unnoticed error, like "Can't find yacc".

      --
      Intron: the portion of DNA which expresses nothing useful.
    2. Re:problem building dbacl by rayde · · Score: 1

      brilliant... i installed byacc and flex and now it looks like it was able to finish. thanks for the help!

    3. Re:problem building dbacl by Doctor+Crumb · · Score: 1

      you've got the syntax wrong. that should be: ./configure && make && make checkmate

    4. Re:problem building dbacl by Anonymous Coward · · Score: 0

      Offtopic??? if anybody read TFA they would realize that building dbacl is a required step to create this chess-playing program.

    5. Re:problem building dbacl by pclminion · · Score: 1

      You need to add -lfl to the link line (probably in LDFLAGS).

  34. Stone Soup by aridg · · Score: 2, Insightful

    Reading this article, I was reminded of the old children's story about "stone soup". You remember that one -- someone advertises that he can make soup from a stone, and various others gather around to watch this amazing feat. Well, the soup needs a little extra seasoning, so he gets someone to put in some carrots while the stone cooks, then he adds some onions, etc, etc... I think you can see where this is going.

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

  35. Re:Spam Filter (if you'd RTFA) by Anonymous Coward · · Score: 1, Funny

    "for short, the answer is No:"

    On the other hand, will DeepThought beat the spam filter at spam filtering ?

  36. I call dupe. by jackofallbrandnames · · Score: 1

    Didn't we try AI playing chess in 1989? and lost?

    --
    The geek shall inherit the earth.
  37. anything by akhomerun · · Score: 1, Informative

    anything with a chipset or processor of some kind can be programmed to play chess.

    1. Re:anything by julesh · · Score: 1

      Yeah, but by statistical methods? This is interesting. Ultimately doomed to failure, but interesting.

  38. This topic is silly by Anonymous Coward · · Score: 0

    A baysian filter is merely a statistical model. Of course it can model things other than spam. Why is this a topic?

    1. Re:This topic is silly by julesh · · Score: 1

      Because it isn't entirely clear how far a statistical model of chess games will get you in actually playing them?

  39. chess less, go more! by grikdog · · Score: 1

    This is brilliant (I'm still reading the article), and really really should become become part of the GNU Go project asap! Go (aka baduk, wei qi, etc.) is a natural candidate for Bayesian analysis, since the two best computer Go programs (WinHonte, Many Faces of Go) are already neural nets.

    --
    ``Tension, apprehension & dissension have begun!'' - Duffy Wyg&, in Alfred Bester's _The Demolished Man_
  40. Correspondence Chess by scottc229 · · Score: 1

    What I'm wondering is whether or not it will tag my correspondence games and put moves in appropriate folders for me (patzer, novelty, genius) so that I take care of the easy ones first. Say what you want about the article, at least it isn't a dupe!

  41. Well I must say... by Kjella · · Score: 1

    ..it would certainly be easy to "spam" this filter. You always have a lot of "noise" moves in chess, which don't actually contribute much to the plan but will throw off a simple pattern match. A somewhat absurd pawn move for example. Suddenly the bayesian chess player is blinded. Never mind that I'd start with some absurd opening playing against it... So while it can be done, I don't think Deep Blue is trembling in his pants (microprocessors).

    Kjella

    --
    Live today, because you never know what tomorrow brings
    1. Re:Well I must say... by lawrenqj · · Score: 1

      Well actually Bayesian filters aught to be able to discard inserted "noise". I'm not sure how the package the article pointed out works, but usually the attempt at pattern recognition accounts for either noise or randomization and finds appropriate matches despite small changes. So a bad move on the human's part should be ignored by the filter. I'm not sure it would be able to take advantage of the situation though.

      The question I have is how well Deep Blue would do at spam filtration if it weren't obsessing over the kings and rooks all the time...

  42. No! The real question is: by Anonymous Coward · · Score: 0

    Can it run Linux?

  43. clever application of an old idea by Optical+Voodoo+Man · · Score: 2
    What I really liked about the article was its use of an existing technology in a novel way. I never would have thought to use a Bayesian filter to look at tables of chess moves in order to develop a program to play the game. I also thought that demonstrating the use of pipes to move data from out of one program into another was interesting. Some people complained about the length of the article, but I can't see how the authors could due justice to the work they had done in a couple of paragraphs.

    It made me wonder what other applications there might be for these kinds of filters, which I assume is what the authors intended.

    1. Re:clever application of an old idea by Anonymous Coward · · Score: 0

      I also thought that demonstrating the use of pipes to move data from out of one program into another was interesting.

      Welcome to the Unix world!

      Remember: you doit in shell until correct, then you doit in C for speed

  44. Hmmm... by __aaclcg7560 · · Score: 3, Funny

    I would have my spam filter busy on filtering out spam. If I caught it playing chess (or worst, net hack), it can go to /dev/null after I find a replacement. :P

  45. Feedback? by blacksky · · Score: 1

    Someone alluded to the Wargames movie/book. Which begs the question: would you see an improvement if you set the bayesian filter against itself, and fed the resulting games back into its knowledge base? Would favouring the shorter games in this feedback loop improve it further?

  46. AI Koan by BusterB · · Score: 2, Informative

    In the days when Sussman was a novice, Minsky once came to him as he sat hacking at the PDP-6.

    "What are you doing?", asked Minsky.

    "I am training a randomly wired neural net to play Tic-Tac-Toe", Sussman replied.

    "Why is the net wired randomly?", asked Minsky.

    "I do not want it to have any preconceptions of how to play", Sussman said.

    Minsky then shut his eyes.

    "Why do you close your eyes?", Sussman asked his teacher.

    "So that the room will be empty."

    At that moment, Sussman was enlightened.

  47. Could be done better methinks..... by tmortn · · Score: 1

    Instead of looking for patterns in entire games you really need to pull the subset of following move choices in games with the same board state.

    So what you really need to do is to compile a filter of board states after every move in every game in your history. Then you account for current board state in your game and look for any game that contains your exact board state (regardless of number of moves to reach it). From there any following move selection would be valid (assuming your match is only pulled from games the side being played won). If you fail to find an exact state then you need to compile a list of states you could create and then search for that pattern.

    So look for a matching board state from your list of known games that led to a win/draw and then pick one of the list of following moves. Probably the one you have the most examples of as that would imply the highest number of winning scenarios.

    That would be a beysian match of what followed in a prior example.

    Then if you didn't have any game states in your db that matched your current game state you would then compile which states you could create and look for a match. Again look for the match that returns the most examples.

    that is a beysian search to complete a pattern.

    I think this would solve the strategy problem as once you reached unkown (ie uncharted thus your off the path of example or pre cached strategy) you would make moves to bring you back to the known. Should theoretically allow you to transition game lines as well though in part you are going to be driven by your opponents skill and breadth of your DB here. The irony being the more skilled they are the more likely to bring you back to a known game line they will be ( in most cases ).

    Might be possible to reach a state where one move could not get you to a known state in your library at which point you might have to run a second iteration. I think 3 iterations is about as deep as you can go in a realistic time frame. But once you start running through iterations like that you are dealing with a chess engine.

    --
    I don't ask you to be me. I only ask you not expect me to be you.
    1. Re:Could be done better methinks..... by Aciel · · Score: 1

      Perhaps the Viterbi Algorithm would be appropriate for this?

      http://en.wikipedia.org/wiki/Viterbi_algorithm

      It's used in grammar checkers and part of speech taggers to determine what parts of speech can validly follow others.

  48. All the right moves? by t0asty · · Score: 1

    Move rook at (Free iPod , Sexy Singles Webcam) to (Viagra , Nigerian Bank Account). Checkmate.

  49. could maybe beat a 3 year old. by nietsch · · Score: 1

    That was (more or less) the admission from the author. But I think it still was an interesting read. He was using a bayesian spamfilter mind you, not an dedicated chess engine.

    But apart from the novel idea, it does not make me go install his bayesian spamfilter or develop artifical chess players.

    --
    This space is intentionally staring blankly at you
  50. The point by ate50eggs · · Score: 1

    I noticed the article is under a tab on the page labeled "fun." It's fun making tools perform tasks that they aren't designed for, at least it's fun for some people. people who used to watch MacGuyver.

    I read the whole article. the author seemed to be very concerned about avoiding the addition of non-spam-filter functionalities. it's kind of a cool thought experiment - along the same lines as "can I unscrew a screw with a butterknife?" or "can I make a superior wiresless antenna out of a tin can?" or "could the professor really have made a radio out of a coconut?"

    in this case it's even more interesting in a way because you are playing with an agent that sort of seems to think - or at least it has behavior. it's distantly related to questions like "how did bacteria designed for a marine environment evolve to live on land?" or "how do we get rid of all of this kudzu?!?"

    I thought it was pretty cool. now please excuse me while I make a moped out of a bike and a blender.

    --
    not everything is a science experiment!
  51. What if... by Chuckstar · · Score: 1

    ... you ignore the 'x' altogether.

    Specifically, delete all the 'x's before running anything through dbacl. Put back the 'x' where necessary in returning the move to the chess program.

    That way Nxd5 = Nd5

    The idea being that whether or not you make a specific move is not always dependent on whether you make a capture. Sometimes you just want the piece on that spot on the board. The program currently treats those two instances (moving a piece for a to b, and moving a piece from a while capturing the piece at b) as different moves, so that the presence of a piece at b alters the outcome of the decision process.

  52. CheckMate by Cygnus78 · · Score: 1

    Suddenly you will get a spam like:

    ---
    queen h7, checkmate!
    ---

    A little later:

    INBOX ( 239 New mail )
    SPAMFOLDER ( 0 New spams - Checkmated )

  53. More importantly.... by MiKM · · Score: 1

    Can a chess program filter spam?

    1. Re:More importantly.... by razmaspaz · · Score: 1

      Yeah, I thought the same thing. If a spam filter does a crappy job playing chess I think it is a reasonable assumption that a chess program does a crappy job filtering spam. Of course maybe a chess program does a much better job at both filtering spam and playing chess. It would be interesting to find that out. Of course I have no knowledge of what it takes to be either a good chess program or a good spam filter, so I have no basis for making these assumptions.

      --
      I tried for 5 years to come up with a clever sig...only to realize that I am not clever.
    2. Re:More importantly.... by Anonymous Coward · · Score: 0

      Yes, but only in Soviet Russia.

  54. I wouldn't know... by Lillesvin · · Score: 1

    ... but I prefer just to use it to keep spam out of my mail and then play chess with my friends... Oh, wait... ;-p

    --
    "Live free or don't."
  55. Next week on slashdot: by Alsee · · Score: 1

    Can a Chess AI filter spam?

    -

    --
    - - You can't take something off the Internet! That's like trying to take pee out of a swimming pool.
  56. Re:Pawn? !!! by Anonymous Coward · · Score: 0

    You folks must be "board."

    - Randolf Richardson.

  57. yes, but by Anonymous Coward · · Score: 0

    can you teach a Batesian mimic to play chess?

  58. Does it...? by Mechcozmo · · Score: 1

    It also plays Solitaire, right? FreeCell? Any card game?

  59. Does it...? by Mechcozmo · · Score: 1

    It also plays Solitaire, right? And FreeCell?