
Show HN: Play Hearts – Open-source, made with Vue and web sockets - zeschnell
https://www.playhearts.cards/
======
MilnerRoute
How hard would it be to add AI players so that one person wouldn't need to
find friends to play with?

It seems like you'd just need a few basic algorithms. (Pass the king and ace
of spades, or your highest hearts, or other high cards. Then just keep track
if a heart had been taken...)

~~~
zeschnell
Great question--I hadn't thought of this. I've never added AI to an app, but
in school I built games with computer players that use depth-first search
algorithms. It was pretty straight-forward to implement, and it was trivial to
determine how "hard" you wanted the computer to play (you would just choose
how deep for it to search).

Let me know if you're interested in seeing this--could be a fun addition!

------
tremdog
Great game! Love playing with my friends

