Programming Technique: How to create a simple card game

前端 未结 6 1186
自闭症患者
自闭症患者 2020-12-24 00:10

as I am learning the Ruby language, I am getting closer to actual programming. I was thinking of creating a simple card game. My question isn\'t Ruby oriented, but I do kno

6条回答
  •  一个人的身影
    2020-12-24 00:31

    Don't bother looking for an AI package

    You will learn more and get greater satisfaction by coding the "AI" yourself.

    Start simple, just consider:

    • game state - what cards have been played or seen, what cards are visible to all players
    • strategy - how does a computer player respond based on its current hand and its knowledge of the game state

    once you have that working, you can get develop more sophisticated strategies:

    • inference - what cards does the human player likely hold based on her prior actions
    • game tree search - how to maximize the chance of winning given what could possibly happen

    then if you want to get really sophisticated, you can start looking into opponent modeling

提交回复
热议问题