Thursday, July 17, 2014

robot strategy in spades has been reworked

Tom Servo says "want to play a game of Spades?"
In June, I took a stab at improving the robot strategy in the game of Spades.

I've taken more time to revamp the Spades bots, and those changes were deployed this morning. Both bidding, and choosing a card to play, have been substantially reworked. The bots are still far from perfect - there are some subtleties in Spades that I haven't handled, but I will eventually get to them. For now, I think that their new behavior makes them better players in general, and better partners, too.

If anyone notices specific bad habits that linger on, I'd like to hear about it. Feel free to write me at marya@worldofcardgames.com or just post the issue in the comments section.

10 comments:

Anonymous said...

dear mary in spades I've noticed that the east and west partners usually get at least three nill shots a game or more and thr north and south partners are lucky to get one or two at most if your lucky. this seems to hold very consistant. thank you.

Anonymous said...

Thank you. Your efforts are most appreciated as is your dedication to making this site a fun place to spend time.

Marya said...

Hi Bob,

The cards are dealt randomly, so in theory it should not be possible for one or more seats to be more favorable for nil. It's strange to get this report... Can you please clarify some things?

1) Do you notice this happening with human partners and bot partners also?

2) Are you saying this started happening recently, after the change to the bot strategy, or did it happen before?

3) When you say they get "three nil shots" do you mean that they are able to successfully defend a nil bid every time? Or do they just bid nil more often, even if they are set?

Thanks for any details.

Anonymous said...

This made me giggle because everyone is north south on their own screen. It's just the luck of the card distributions that make it feel like the opponents always get the nil breaks.

Anonymous said...

I second that motion! This site almost seems like it is a miracle because it is a melting pot of individuals. There are those in their 80's or beyond. There are pre-teens as well. Some have disabilities and struggle with physical movement or mental thoughts coming quickly. We see individuals from Brazil, England, the United States, New Zealand, India, Canada, Australia, and the list could go on and on. Talk about teaching everyone about other cultures, this website does that. Oh, and for those who don't like the chat line usage, the chat line (during a game or while waiting for other players) provides all the information about people of other lands and thoughts. This website has made me more tolerant of others' places in life. The chat line makes this whole thing human. Without it, you might as well just play robots.

RevEggum said...

Question ..
The new Bots are a joy to play with ..
But are they all programmed equally or do they have individuality ?
Are the idiosyncrasies the result of card distribution only ..?
Just askin ..

Thanks Again ..
RevEggum
Omaha

Marya said...

Hi RevEggum,

Thanks for the feedback on the bots! I'm glad you find them an improvement; I do realize they need more work, though.

To answer your question: They are not "individuals." Their behavior just depends on the cards in their hands and what they've seen at the table. Eventually, I hope to add a little bit of personality...

Bagwhore said...

lol... had me scratching my head with that one..

Anonymous said...

The bots seem to cover a nil quite well, however; when partner has bid nil and the chair 1 cover partner is too slow to lead a card, the computer selects a lead and it is usually low, sometimes a deuce. Is not the computer selection program the same as the bots program?

Marya said...

I will look into this.

When I first took over the site, all the games were programmed to play a random card if someone took too long to take their turn. This was done to discourage people from waiting till their turn timed out so that the computer would play for them.

A while ago, someone pointed out that this random card play could be disastrous when playing Spades - a player who took too long to play, perhaps due to a poor internet connection, might immediately bust someone's nil by being forced to play a poor card.

So in Dec of 2013 I modified the software to handle the first few timeouts in Spades differently. The cards chosen are a better than random. But this only applies for the first few timeouts - if you keep timing out, the computer will eventually start playing random cards again.

However, this code does not entirely match the bot code (for technical reasons). In fact, it probably should. So I will add this to my to-do list. Thank you for pointing it out.