From: "Hal E. Fulton" Date: 2002-08-08T16:51:31+09:00 Subject: The whole 'Spades' thing: GA and cardbots OK, I have more useful things to be doing. But sometimes I like to code just for fun. I can admit that here, right? :) What I had in mind for the Spades project was originally a genetic algorithm type of thing. That is, you define a genome based on some options for bidding and playing, and you play the members of the population against each other as they evolve. I think it's interesting from a GA standpoint (disclaimer: I've never written a GA program). For one thing, it's not clear that a simple tournament would suffice to find optimal strategies. You might just find a "local maximum" where the surviving members can beat the previous generation, but couldn't necessarily have beaten some earlier generation. For another thing, the game is typically played with partners. So we want to mix things up so that partners have the chance to be complementary or to shoot each other in the foot. It's conceivable that an algorithm A might fare very well when partnered with its own kind, but an algorithm B might do better with an *arbitrary* partner and thus win overall. Too much for my poor brain. Another interesting idea: Implement a 'server' (say, via DRb) that does nothing but referee games -- it shuffles and deals, tracks bids, keeps score, kills players who break the rules, etc. Clients connect and act as players. This is like the old C-bots or whatever (there must be a million variations). You're pitting your code against someone else's code. A player class need only have a fairly simple interface. It would need to respond to messages like 'bid' and 'play' and so on. Perhaps we could also have a method like 'broken_rule' so that the server can tell the client it's done something illegal. If it's all done via DRb, there's no chance (I think?) for a client to cheat, say, by looking into the object space and finding his opponent's cards. I'm really just dreaming, but I do think it would make a fun project. If someone wants to work on it, let me know (the GA or the cardbots). Otherwise, I'll probably just implement 40% of each one and quit. :) Cheers, Hal