# How can I develop a reinforcement learning agent that plays memory cards game?

I am new to RL, and I am thinking of doing a little project. The goal of the project is to learn an agent play the memory game with cards.

I already created the program for detecting the cards on the table (with YOLO) and classifying them what kind of object they are.

I want an agent to be able to play the memory game by itself, without being explicitly told the rules and such.

Any tips on how to get started to make the RL process easier?

• Hi and welcome to AI SE! Are you talking about this game: https://en.wikipedia.org/wiki/Concentration_(card_game)? – nbro Mar 28 at 17:25
• Hello. Yes, this is the one. – Five0 Mar 28 at 20:22
• Environment is not fully observable you cant model it as MDP and work in standard RL framework, you would have to model it as POMDP and then research what RL algorithms are available for such environments or try to use LSTMs maybe with standard RL algorithms. Also, environment is very dynamic, card layout changes every game so it will be quite difficult to learn something meaningful. You picked very hard problem for beginner project. – Brale Mar 30 at 10:30

Next you need to define how the agent can interact with the environment, that is choosing a card or flipping a card etc. Also how the environment will behave when the agent chooses a move.
Finally you need to define the fitness function, in this case the score (number of pairs created) should be fine. You should have a look at some online RL competitions to get a better understanding of the architecture. AWS DeepRacer