Skip to content

A distributed IoT Blackjack System combining Deep Reinforcement Learning (Python/PyTorch) and Embedded Systems (C++/Particle Photon 2). Uses Computer Vision to identify cards and a compressed Neural Network policy on a microcontroller to provide real-time, optimal strategy advice.

Notifications You must be signed in to change notification settings

mesentman/EE1301Project_blackjack_assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blackjack Assistant: Distributed IoT & AI Strategy Engine This project bridges Artificial Intelligence and Embedded Systems to create a real-time Blackjack strategy assistant. We developed a distributed IoT system that uses Computer Vision to identify cards, processes game states using a Deep Reinforcement Learning (DQN) model, and provides optimal strategy advice via a microcontroller dashboard.

How It Works:

The "Brain" (Deep Learning): We trained a Neural Network (Noisy Dueling DQN) in Python to master Blackjack strategy, incorporating advanced card counting (Hi-Lo) techniques to overcome the house edge.

The "Bridge" (Optimization): To enable real-time performance on low-power hardware, the AI model was distilled into a highly optimized C++ lookup table, compressing millions of training episodes into an 11KB firmware payload.

The "Body" (IoT Deployment): The system operates as an Edge Computing device. An iPhone camera captures the table state using Computer Vision and transmits card data over the network to a Particle Photon 2 microcontroller. The Photon instantly calculates the mathematical Expected Value (EV) and displays the optimal move (Hit, Stand, Double) and win probability on an attached screen.

Key Technologies: Python (PyTorch), C++, Embedded Systems (Particle Photon 2), Computer Vision, Monte Carlo Simulation.

About

A distributed IoT Blackjack System combining Deep Reinforcement Learning (Python/PyTorch) and Embedded Systems (C++/Particle Photon 2). Uses Computer Vision to identify cards and a compressed Neural Network policy on a microcontroller to provide real-time, optimal strategy advice.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •