Git Product home page Git Product logo

hearts_pomdp's Introduction

Hearts POMDP

A POMDP that plays a two-player Hearts variation.

What is two-player hearts?

For the two-player variation of hearts, all cards are removed except twos, fours, sixes, eights, tens, queens, and aces. 13 of each of the remaining 28 cards are dealt to each player, and the remaining two cards are not used in the game.

How does the POMDP work?

The POMDP uses a rather naive formulation in which the opponent is modeled as part of the environment, and takes random actions (as allowed by the rules).

How do I install/run it?

To run this code, you must first have Python 3.9 installed, as well as Poetry.

To build the virtualenv and install dependencies, run:

poetry install --no-root

Running the Planner

plan_hearts.py is an example script that plans a policy and uses it to play a single game of hearts. Policy planning is done online, so the policy is updated after each observation is received. It can be run as follows:

poetry run python plan_hearts.py

Running the Simulator

If you want to play against the agent, you can do that through a simulator:

poetry run python -m simulator

hearts_pomdp's People

Contributors

djpetti avatar tbuff10 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.