AI for a card game

Hi,

I’m on a card game (“la belote coinchée”), I have done most of the UI and functionalities. Now, I’m working on the AI.

There is to step by game :

  • bet (“mise”) : I made some functions for the card in hand. It works not too bad but it doesn’t take in account other bet.
  • play : I start to put a set of rules but it beging to be awfully complicated without having a real strategy…

I will take any advice/tips that will help me :wink:

Webstart version

(The game is only in french right now but it is not too difficult to understand)

How to play (quickly explained :P) :
“Mise” : one after another play do a bet. If you don’t want to put any, just pass (“passe”). When someone bet, he must put a higher bet (step of 10). When someone bet, he give a color that will be the trump (“atout”). Bet ends when noone put a higher bet. (“capote” and “coinche” not working right now)

Bonus :

  • If you have 3 following cards +30 points
  • If you have 4 following cards +50 points
  • If you have 5 following cards +100 points
  • If you have 4 queens, 4 kings, 4 10, 4 aces +100 points
  • If you have 4 9 +180 points
  • If you have 4 V +200 points

If you have the queen and the king of the trump card, +20 points (not in game yet, you have to say “belote” and “rebelote” when you play thoses cards)

“Play”: the order of the cards are from weakest to strongest : 7, 8, 9, V, D, R ,10, 1
and for trump card : 7,8, D,R,10, 1, 9, V
You must put a card that is the same color than the first card.
If you don’t have the color, you must put a trump card (and you get cards if no one else put a higher trump card).
If you don’t have the color and your partner has put the hight card, you can put any card you like.
If the fist card is trump color, you must put a higher trump card (if you can’t put any other trump card).