Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Developing a Pinochle Playing Bot
I would like to start this thread with the discussion of a point that should logically be discussed LAST!

Bot Feature: Unpredictability

It is more complex to discuss what should be the primary card thrown in a specific case, but in pinochle there are situations where there are multiple "correct/acceptable" plays.  When this is the case, do you think it is wise to incorporate a randomizing component which would keep the human opponents guessing about what the play "means"?

A recent post discussed the benefits of using misinformation (false signalling) to confuse your opponents regarding the quality and length of the remaining cards in a suit.  I reckon if it is good for the Man, it must be good for the Bot.

You could even control the frequency of the randomization.  Perhaps the 1st-choice play is done 66% of the time, and the 2nd-choice is done 34% of the time (these are just arbitrary amounts, of course, and there may be situations where there are more than 2 options).

Another example is leading Aces.  There are logical considerations for the order by which you play your Aces (not to mention "Sandbagging") -- and discerning players can deduce valuable information from this order.

If the Bot is disadvantaged by predictability, the solution is unpredictability.

It's unbelievable how much you don't know about the game you've been playing all your life. -- Mickey Mantle
Bot Testing:

@marya, if you are looking to develop your pinochle playing bots, I have a notion to share.

  1. you can develop a means to export the hand histories to suit my existing Hand Animator (currently only handles Power Pinochle Hand Notation).
  2. you can run pinochle games using 4 bots.
Then, you can export your bot games to PP and our members can analyze the plays via my Hand Animator program and make suggestions for improvement.

Using this type of development cycle, you would stand to design the absolute best Pinochle Bots on the web.

This is a very exciting prospect that I know at least a handful of our members would be thrilled to contribute to.
It's unbelievable how much you don't know about the game you've been playing all your life. -- Mickey Mantle
Unpredictability...definitely NOT now.  Start with predictable.  Get it to the point where it's following sound notions;  add unpredictability as an extension when there are clashes between principles.  For example, cashing aces as declarer.  Spades are trumps.  When you have


it is clearly better to cash  AH before the  AC .  But now, given


clearly you start with  AH first.....BUT, what do you play now?  There are 2 principles here.  #1:  first aces before second aces.  Lead a suit that hasn't been led, in preference to one which has been.  This extends in obvious ways.  #2:  Short aces before long aces, with the extra emphasizing point of crashable aces have priority.

Mathematically, it probably doesn't matter much at all.  If the club ace is ruffable, that means someone was dealt a void...when you have only 5 cards in the suit yourself, this has to be infrequent.  For the second heart ace to be ruffed, someone started with a singleton...when you had only 3.  Also very unlikely.  Having either ruffed would be a very bad break.  

Change the situation and you may change the answer.  A more extreme case:


PROBABLY I'd go heart, heart, club, heart, club as the best order.  But the first order of business should be to avoid the clear mistake:  playing clubs first.

Also on this point...being predictable helps your partner...if he's a regular partner...more often.  He'll have more chances to see what you're doing, and more incentive to read it.  (I fully grant that this might be demonstrating a FOOLISH optimism.)  

Also, only very attentive opponents will even notice.  Go back to this situation:


Spades are still trump, and further stipulate that you did NOT meld aces.  (That was the intent of not showing diamonds, but I'll be clear here.)  If you cash all 3 aces, in any order, AND taken with the fact that you don't have aces...the risk that you're sandbagging in ANY suit is low.  Partially cashing aces in a side suit, then sandbagging the others, is very poor play.  If you intend to exit with a trump after going about your business in these suits, then retaining the  AC maintains the *potential* that you're sandbagging, and it could be in either clubs or diamonds.  It's a LOW frequency approach.  90% of the time...if not more...I'd cash all 3.  The confluence of factors that can make the deceptoin effective is fairly substantial.

The other aspect of this is, this is just one point about *declarer* play of aces, in a case where there's no, or very little, chance of non-ace tricks in that suit.  How good does a side suit have to be, to consider underleading that suit?  When are you better off playing useful ruffs...partner, or BOTH opponents, by cashing all your aces and exiting low?  To illustrate:

AG AG TG TG QG JG   will often yield 3 tricks, and 4 sometimes.
AG AG TG TG TG QG   is worth 4 tricks IF you can get trump out later, and IF you start by leading the  QG  with an ace winning the trick.
AG AG TG TG TG QG JG   lovely....but ruffs are becoming a serious issue.  So a line of cashing the aces, then exiting  QG  offers the chance to force the other aces out because they're in shorter suits.
AG AG TG QG QG JG   will sometimes yield 3 tricks, and OCCASIONALLY a 4th.  Cashing wins when partner has both missing aces (he gets to signal), or when he's got 4 or less...three rounds gets him close to ruffing for you.  

And these are the EASIEST situations, because they're at the absolute start of the hand.

I also gotta say that...without trying to boast here...I strongly suspect I've read more about the impact of deceptive bids or plays.  I had a subscription to the Bridge World for 30-odd years.  Every issue included reports of hands from the absolute top levels, involving the best players in the game.  Deception cuts both ways;  top notch pros, playing with other top notch pros, who have practiced and played together for years, will still mislead their partner by their deceptive play, and cause them to play wrongly.  Deceptive play works by painting a false picture...well, that's only useful if the opponent can paint the picture.  It's spectacular when it works...but it works best when used sparingly.

Besides, the only use for a bot is as a teaching tool, IMO.  Deception's a topic that's much too advanced.  I'd rather see the work go into, say, having NewBot...makes all the first-timer kinds of errors...StudentBot...a beginner but with a decent set of lessons in place...and PlayerBot, where you strive for more situational assessment.  StudentBot would be somewhat more complex than NewBot;  PlayerBot would be MUCH more complex than StudentBot.  Until you get to PlayerBot, having the bot 'consciously' execute deception is impossible.  It wouldn't be deception, it would just be poor play.  StudentBot actually could have unpredictability not for deceptive purposes, but to represent casual or thoughtless play.  That DOES happen.  But to what effect?  The 'misplay' may have no impact;  or even if it does, to show the impact, you have to:

a)  let the mistake play itself out until the negative impact is noted, then 
b)  reset to where the mistake was made, change the play, THEN play through the hand to see the improvement.

This is the kind of approach a real teacher can take, playing live;  online, I gotta think, it's a PAIN.  I'd stipulate that voice...either speech to text, or full voice a la meeting software...would be necessary;  the pace of typing is just far, far too slow.  And obviously, the table/room would need controls to support repeating the hand, then overriding the bot at some point and taking over.
Just responding in general... at WoCG, the bots only have one skill level. It is widely recognized (and admitted by me) that the bots are pretty poor players. The reason is that I just haven't had time to make tons of improvements. Most people come to the site to play with humans and don't feel it's fun to play with bots, no matter their level of expertise.

The bots are best in Euchre, where I've actually had a lot of specific input from a couple of players who helped me to improve them. In other games, they are poor, although I hear that the ones in Spades are getting better lol.

I have seen one app game that has a pretty good AI, and also has levels of skill that you can choose. So you can choose to play against "dumb" bots and win all the time, or play against smart bots and be more challenged. I'd like to add this feature, but realistically don't see it happening soon.

As a general rule, if there are two equally good plays to make, I would think randomizing the bot's decision would make sense. It would make them less predictable and more human-like.

However, I can see ToreadorElder's point as well. It appears to me that in Pinochle, more than other games, your partner's predictability is extremely important. So maybe randomization in this game is a bad idea.

FWIW I can see the same thing happening in Spades. For example, I might tell my partner in advance "If I ever play a King before the Ace has been played, it means I want to get rid of it. Please take it if you have the Ace." If my partner did not know that about me, they might play a low card and let me take the trick with the King, which might actually have the negative result of giving me a bag.

Getting to know your partner really helps, and I can see why some people only want to play with a small group of partners.
Play Pinochle at World of Card Games!
Multiple skill levels would be a nice goal, and a goal that I think has more value than deception.  

In cases where there is no preference, such as (continuing the general situation from above)


it's absolutely reasonable to randomly choose.  But before worrying about that...if you can reach the point where it knows that those are equal, but 


is're starting to get there.  But if it treated these as equal, that's not horrible.  What IS bad is a case like


and watching someone cash all the hearts before ever touching a club.  Or something like this.  South is declarer, spades are trump.

Trick 1:    AD ,  QD ,   KD ,  JD
Trick 2:   AD ,  QD ,   JD ,  QD
Trick 3:    QD ,  AD ,  KS ,  KD     North wins the trick and is on lead.

Tricks 4 and 5, North cashes some aces.

Trick 6, North exits with  QS, won by East with the  AS .

Trick 7:  East leads..... AD

AHHHHH!!!  You should ask well, why would he do that????  But I have seen it.
ToreadorElder, Thanks for the tips. It's on my schedule to review the bot code soon, and I'll be on the lookout for any of these problems. - Marya
Play Pinochle at World of Card Games!

Forum Jump:

Users browsing this thread: 1 Guest(s)