Thanks! The AI is really simple, it iterates through every card in its hand until it finds a valid placement and then picks that card. If there is no valid placements, it picks a random card. I hope that answers your question.