"Artificial intelligence" is actually an overstatement. The computer opponents simply checks a few conditions on each of their turns, and then decides how to act. For example:
) is there a chance to get rid of bad cards
) do i want to takeover the trick so i can start the next round
) do i want to split pairs/multiple cards or better skip and keep them
) switch cards: the ai always changes the lowest non pair cards, as long as they are under 10. otherwise it takes the lowest cards