Coding a Vision ChatGPT that plays Poker Autonomously! (GPT-4V Python tutorial)

preview_player
Показать описание

Explaining how to make GPT-4V play Poker for me (Autonomous Vision bot in Python)

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 important to mention that although GPT-4 can play Poker quite well, it's not perfect, makes errors from time to time and creating an automatic bot to play with real money could cause big losses. I also want to mention that apparently seems to be legal in most of the cases to use such a system to play Poker online, but that could not be the case in some occasions, so always check the rules and laws at every place before using it.

Timeline:
0:00 - Intro
2:44 - Getting started with GPT-4V
9:48 - Install PokerTH
13:05 - Basic Poker Assistant (manual)
19:38 - Helper cropping methods
25:13 - Autonomous Poker Bot
34:58 - Conclusion

Subscribe to see more AI and ML programming related content! 🚀🚀

-------------------------------------------------------------

#gpt #gpt4v #gpt4 #openai #poker #promptengineering #chatgpt #openaiapi
Рекомендации по теме
Комментарии
Автор

That's funny it's also one of the first usecase of gpt4-v I've done

DADLOLO
Автор

No sabía que podía hacer eso, buen vídeo

ax_HvH
Автор

Great video, thanks! Do you take on private clients to implement the Vision API and other projects?

syenza
Автор

I have something similar, but more advanced. GPT4 can actually play poker on quite a high level.

randotkatsenko
Автор

I am stuck. Getting the following error
Import "openai" could not be resolved

Any idea guys? I followed everything exactly.

umtombs
Автор

can you help me with pricing? This bot requires the CHATGPT 4 API, right?
How much do I need to spend on that?

reformulandoer
Автор

what was the price of one recognition?

gekstudio
Автор

sabes si hay otra api comatible que sea gratis?

ax_HvH
welcome to shbcf.ru