More informations on the card game I'm talking about are in my last question here: DQN input representation for a card game

So I was thinking about the output of the q neural network and, aside from which card to play, I was wondering if the agent can announce things.

Imagine you have the current hand: 2, 4, 11, 2 (The twos are different card type).
When you're playing the game and you get dealt a hand like this, you have to announce that you have the same number twice (called Ronda) or thrice (called Tringa) before anyone plays a card on the table. Lying about it gets you a penalty.

Could a DQN handle this? I don't know if adding "Announcing a Ronda/Tringa" as an action would actually help. I mean, can this be modeled for the NN or should I just automate this and spare the agent having to announce it everytime.

  • 3
    $\begingroup$ Is there any possible tactical advantage to lying and accepting the penalty, in the normal game? $\endgroup$ Commented Jul 8, 2018 at 19:44
  • $\begingroup$ Thing is, if both players have a Ronda, the one with the highest number wins 2 points so u could lie and he gets only 1 point but thats too human i believe, plus if they catch u lying u get the penalty either way so im starting to belive that i shouldnt include it? $\endgroup$
    – Haytam
    Commented Jul 8, 2018 at 20:11
  • 1
    $\begingroup$ If lying/concealing the Ronda, plus detecting or calling out the lies is part of the game, then I think it is up to you when implementing the bot. Perhaps save it for v2 if you are just starting out with first implementation. How hard in reality is it to detect the lie? If it is something that will always be noticed by a perceptive player with a good memory, then perhaps it is not so good in the automated game, because it may be possible to fully automate it without any real use of AI in the first place. $\endgroup$ Commented Jul 8, 2018 at 20:15
  • $\begingroup$ It's not that hard to detect that a player lied about a Ronda, since you only have to remember the 4 cards he played and you'll find out. $\endgroup$
    – Haytam
    Commented Jul 8, 2018 at 20:16
  • 1
    $\begingroup$ In that case it seems to be a minor tactic in any game with experienced/good players, and you could maybe skip it. However, it is an interesting question in general - other card games may not have such a clear decision about when to include this kind of tactic. $\endgroup$ Commented Jul 8, 2018 at 20:19

1 Answer 1


The simplest thing to do when you make you first implementation of the agent, is to automate decisions like this, in order to keep representations and decisions simple.

However, if you want to explore tactics surrounding declaration, then I think the following applies:

  • There should be an initial round of actions where the agent may get to decide whether or not to declare a Ronda, based on the cards it holds. These will be different action choices to playing cards, so you would need to alter your action representation to include those choices. Only allow action choices which are valid, so if it is not valid to declare a Ronda or a Tringa when a player does not have one, then the player does not get to make that choice.

  • You may want to add a state feature "has a Ronda" and "has a Tringa" for the agent's player, to help with the action decision.

  • You should also add a state feature for each player according to whether they declared a Ronda or a Tringa.

  • Rather than have the agent learn to detect a lie, given your comment that all cards are played so it is easy to tell (there are only 8 cards total in play by the end), then I would just assume lies are automatically found out and include that in the game engine. In other words, the penalty is always paid.

  • The interesting question is then whether withholding the declaration can give a tactical advantage when the round is being played (because your opponent knows less about your hand), and whether that advantage offsets the inevitable penalty. This might not be true in your card game, but could be true in games with similar choices.

Could a DQN handle this?

A DQN is maybe going to struggle with partial information in this game. The opponent's cards are hidden from the network, but could have a non-random influence on the opponent's choices of action. It is possible that you will need to investigate agents that can solve POMDPs to get the best player.

I don't know for certain though. It depends on how much tactical advantage there is in having concealed cards, or how much that is just luck that plays out much the same whether you know the opponent's cards or not. If there is strategy, and ways to determine/guess what the opponent holds based on your cards and their actions so far, this is more like a POMDP.

  • $\begingroup$ Thanks for the detailed answer, I appreciate the informations you provided! I guess as a first step I will try to make the agent know when he has a Ronda (given the cards in his hand as features) and to announce it as an action, I will leave detecting opponent lies or lying itself to a "version 2" of the side project. Thank you. $\endgroup$
    – Haytam
    Commented Jul 8, 2018 at 21:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .