All Projects → ishikota → Pypokergui

ishikota / Pypokergui

Licence: mit
GUI application for PyPokerEngine

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Pypokergui

Gimu
Cross-platform GUI for go is never this easy and clean.
Stars: ✭ 64 (-11.11%)
Mutual labels:  gui
Java Mvc Swing Monopoly
模仿大富翁游戏,使用Java Swing (GUI) 实现的单机游戏,遵循MVC设计模式。Created in Java. Using GUI developed with Swing, with a MVC design pattern.
Stars: ✭ 67 (-6.94%)
Mutual labels:  gui
Asap app imgui
Starter project for portable app with optional GUI (GLFW/ImGui) and a rich builtin debug UI. Includes docked windows, log viewer, settings editor, configuration load/save, etc...
Stars: ✭ 70 (-2.78%)
Mutual labels:  gui
Qtools
QTools collection of open source tools for embedded systems development on Windows, Linux and MacOS
Stars: ✭ 64 (-11.11%)
Mutual labels:  gui
P5.clickable
Event driven, easy-to-use button library for P5.js 👆
Stars: ✭ 66 (-8.33%)
Mutual labels:  gui
Nitroshare Desktop
Network file transfer application for Windows, OS X, & Linux
Stars: ✭ 1,150 (+1497.22%)
Mutual labels:  gui
Neuralnetplayground
A MATLAB implementation of the TensorFlow Neural Networks Playground seen on http://playground.tensorflow.org/
Stars: ✭ 60 (-16.67%)
Mutual labels:  gui
Ariang Native
A better aria2 desktop frontend than AriaNg, containing all features of AriaNg and more features for desktop.
Stars: ✭ 1,176 (+1533.33%)
Mutual labels:  gui
Traffic Rules Violation Detection
The System consists of two main components. Vehicle detection model and A graphical user interface (GUI)
Stars: ✭ 67 (-6.94%)
Mutual labels:  gui
Silx
silx toolkit
Stars: ✭ 69 (-4.17%)
Mutual labels:  gui
Artos
Adaptive Real-Time Object Detection System with HOG and CNN Features
Stars: ✭ 64 (-11.11%)
Mutual labels:  gui
Trifusion
Streamlining phylogenomic data gathering, processing and visualization
Stars: ✭ 65 (-9.72%)
Mutual labels:  gui
Hitomi Downloader
🍰 Desktop application to download images/videos/music/text from Hitomi.la and other sites, and more.
Stars: ✭ 1,154 (+1502.78%)
Mutual labels:  gui
Guidefate
GUI Design From A Text Editor
Stars: ✭ 64 (-11.11%)
Mutual labels:  gui
Wxformbuilder
RAD tool for wxWidgets GUI design
Stars: ✭ 1,167 (+1520.83%)
Mutual labels:  gui
Awtk Linux Fb
awtk port for linux framebuffer
Stars: ✭ 61 (-15.28%)
Mutual labels:  gui
Swingtutorials
Tutorials for Java's Swing UI toolkit explaining how to use particular components
Stars: ✭ 67 (-6.94%)
Mutual labels:  gui
Skin.refocus
reFocus, a skin for Kodi
Stars: ✭ 72 (+0%)
Mutual labels:  gui
Ara
ARA Records Ansible and makes it easier to understand and troubleshoot.
Stars: ✭ 1,176 (+1533.33%)
Mutual labels:  gui
Popup Dict
Linux 下的划词翻译小工具
Stars: ✭ 69 (-4.17%)
Mutual labels:  gui

PyPokerGUI

Build Status PyPI MIT License

GUI application for PyPokerEngine.
You can play poker with your AI bia browser.

app_demo

This library assumes that your AI is implemented in PyPokerEngine format.
If you have not checked our PyPokerEngine, we recommend you to check it first.

Tutorial

In this tutorial, we will play poker with simple AI "FishPlayer".
("FishPlayer" is an AI always declares CALL action. )

The outline of this tutorial is following.

  1. Create script to setup our AI
  2. Setup config file which defines rule of the game
  3. Start the server with config file and play the game

Installation

Please install this library with pip.

pip install pypokergui

Create script to setup our AI

First, we will create a script which defines how to setup our AI.
What you need to do is implementing setup_ai method.
PyPokerGUI uses this method to setup your AI.

from pypokerengine.players import BasePokerPlayer

class FishPlayer(BasePokerPlayer):  # Do not forget to make parent class as "BasePokerPlayer"

    #  we define the logic to make an action through this method. (so this method would be the core of your AI)
    def declare_action(self, valid_actions, hole_card, round_state):
        # valid_actions format => [raise_action_info, call_action_info, fold_action_info]
        call_action_info = valid_actions[1]
        action, amount = call_action_info["action"], call_action_info["amount"]
        return action, amount   # action returned here is sent to the poker engine

    def receive_game_start_message(self, game_info):
        pass

    def receive_round_start_message(self, round_count, hole_card, seats):
        pass

    def receive_street_start_message(self, street, round_state):
        pass

    def receive_game_update_message(self, action, round_state):
        pass

    def receive_round_result_message(self, winners, hand_info, round_state):
        pass


def setup_ai():
    return FishPlayer()

We assume that you put this script on /Users/ishikota/poker/fish_player_setup.py in following section.

Setup config file which defines rule of the game

Next we will define the rule of the game.
We need to define following settings in yaml format.

  • max_round : how many round we will play
  • initial stack : start stack size of each player
  • small blind : the amount of small blind
  • ante : the amount of ante
  • ai_players : path to your AI-setup script

You can generate template of config file like this.

pypokergui build_config --maxround 10 --stack 100 --small_blind 10 --ante 0 >> poker_conf.yaml

Then your poker_conf.yaml would be ...

ante: 0
blind_structure: null
initial_stack: 100
max_round: 10
small_blind: 10
ai_players:
- name: FIXME:your-ai-name
  path: FIXME:your-setup-script-path

We replace ai_players items like this.

ante: 0
blind_structure: null
initial_stack: 100
max_round: 10
small_blind: 10
ai_players:
- name: fish_player_1
  path: /Users/ishikota/poker/fish_player_setup.py
- name: fish_player_2
  path: /Users/ishikota/poker/fish_player_setup.py

We assume that you put this file on /Users/ishikota/poker/poker_conf.yaml in following section.

Start the server with config file and play the game

Ok, everything is ready. We start the local server with our config file.

pypokergui serve /Users/ishikota/poker/poker_conf.yaml --port 8000 --speed moderate

Then browser will be opened and you would see registration page.
Please register yourself in the page and start the game. Enjoy poker!!

How to registrate yourself

How to declare action in the game

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].