As you can see here, NPCs have different limitations for how many 4 and 5 star cards they can use in their deck.
The player rule is one 5 star card and one 4 star card,
OR two 4 star cards and no 5 star cards.
Suggested possible fixes:
1. Change NPCs to abide by the same rules as the player.
2. Change the rare card limitations for players to match NPCs.
3. Remove the rare card limitation altogether as frankly it hinders enjoyment of Triple Triad in general (An option to turn limits on for PvP Triple Triad matches if people want them would be okay)