Question: DQN Card Game Does it make sense to have the Agent learn what Cards he is allowed to play?

I am trying to train an AI to play a card game using DQN.

Short abstract overview of the relevant rules of the card game:

~40 cards, 4 player. Every player gets 10 random cards. 10 rounds played where each player plays 1 card(successively). Now you are not always allowed to play every card in your hand, as it highly depends on what cards were already played in the round.

What I am currently doing is having an output of 40 actions in my NN(40 cards) and just take the one with highest value out of all 40. If its a card thats not in the agents hand, or not legal to play in the given situation I just cancel the game, give it a bad reward and go next.

Now what I am wondering is if that makes any sense, or if there is no benefit compared to just choosing the action with the highest value out of all the legal actions in a given situation, that way I would obviously avoid having to learn all the rules regarding what cards are legal to play, and what cards the agent does have in his hand. (the state I use for now is : handcards(40), cardsonboard(40). One Hot Encoded)

I do not really see any advantage of my current way of doing it, Im just not sure if there are any issues that could come up during training when choosing the agents action from a changing subset of all actions?

submitted by /u/TratanusII
[link] [comments]

Leave a Reply

The Future Is A.I. !
To top