Skip to content

An autonomous Poker Bot powered by Computer Vision and AI.

License

Notifications You must be signed in to change notification settings

Leandro-Amorim/visiondeck

Repository files navigation

screenshot

Flickering is caused by the browser's screenshot function and does not affect the software's operation.

VisionDeck

An autonomous Poker Bot (more specifically for the Deuces Wild variant) powered by Computer Vision and AI.

Note: Warning: This software was developed as a proof of concept for educational purposes. Do not try to use it in real situations or you will end up in trouble.

Key FeaturesSetupCreditsDonateLicense

Key Features

  • Autonomous operation powered by Playwright

  • Card identification algorithm using OpenCV

  • 2 operation modes: Internal logic (roughly based on Not So Ugly Ducks Strategy by Wizard of Odds; may have some flaws as I'm not a poker expert) and AI solving (OpenAI or Anthropic)

Setup

Prerequisites

Make sure you have a working installation of Git and Node.js. You will also need the API key of an AI provider if you want to use AI mode.

Environment Variables

Variable Description
AI_MODE Whether to use an AI provider to solve the poker hand. Defaults to false.
AI_PROVIDER Which AI provider to use if using AI mode. Possible values are openai and anthropic.
ANTHROPIC_API_KEY API key to use if the provider is Anthropic.
OPENAI_API_KEY API key to use if the provider is OpenAI.

Step by step

  • From your command line:
# Clone this repository
$ git clone https://github.com/Leandro-Amorim/visiondeck

# Go into the repository
$ cd visiondeck

# Install dependencies
$ npm install

# Run the app
$ npm run dev
  • Follow the instructions listed on the screen (keep the canvas fully on the screen, select the "Deuces Wild" variant and wait for the "Press Deal to Start" message to appear).

  • If you ever need to regenerate the training data, you can do so by adding the card images to the unprocessed-cards folder and running the command:

# Regenerate training data
$ npm run process

Make sure you follow the naming of the files already in the folder.

Credits

Donate

If you think this project has helped you in any way or you've learned something new, consider buying me a coffee, I love it!

Buy Me A Coffee

License

Distributed under the MIT License. See LICENSE.txt for more information.

About

An autonomous Poker Bot powered by Computer Vision and AI.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published