Coding a Vision ChatGPT that plays Poker Autonomously! (GPT-4V Python tutorial)
Skills:
Multimodal LLMs90%Prompt Craft80%Fine-tuning LLMs70%Agent Foundations60%Tool Use & Function Calling50%
Explaining how to make GPT-4V play Poker for me (Autonomous Vision bot in Python)
Blog: https://medium.com/@enricdomingo/making-gpt-4v-to-play-poker-for-me-automatic-vision-bot-in-python-69031c79e733
Donate: https://buymeacoffee.com/edomingodot
NEW VIDEO - Updated video of how to build a similar bot but for GeoGuessr, with the new OpenAI GPT-4o, Anthropic Claude 3.5 and Google Gemini 1.5 Pro: https://www.youtube.com/watch?v=OyDfr0xIhss (check it to know how to update the GPT-4V Poker Bot to GPT-4o)
In this video we will see how to create an automatic bot that uses the new OpenAI GPT-4V (Vision) LLM in order to play Poker in real time. We will be using the game board image to send it to the API in order to give full context from the game state in a single image. If we wanted to do it before using the normal text GPT-4, we would need any scrapping tool which could be impossible or difficult to implement, otherwise we would need to send all the game table information manually, probably running out of time for our turn.
In Poker it is not only important to see our current cards and the table's ones, but also everyone's amount of money, every bet and more details that can influence making a call, folding, or any other action beyond the simple probability of our current hand. For this reason it's important to send as much information as possible, as fast as possible. Now, with the new OpenAI Vision model, this is easier than ever as we only need to take a screenshot of the game at the time of our turn and the API will respond us back with the LLM prediction of the best move according to what we put in the prompt as well.
This is also an original review of this new vision LLM in a quite known and common but at the same time original task.
DISCLAIMER: This is only a demo for demonstration and experimentation purposes. I only used this techniques in my local instance of PokerTH playig against other NPCs without any real bets or money involved. It's also very importan
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
More on: Multimodal LLMs
View skill →Related AI Lessons
⚡
⚡
⚡
⚡
Is Claude 4.x Actually Smarter, or Just Hardwired to Spend?
Medium · LLM
Beyond Facts and Triggers: Closing the Gap Between “Knowing” and “Understanding” in LLM Assistants
Medium · LLM
Why your dating app conversations die after 3 messages — a technical breakdown
Medium · Startup
What If LLMs Learn Better from Language Than from Rewards?
Medium · AI
🎓
Tutor Explanation
DeepCamp AI