Skip to content
← Back to Community
could someone tell me how to make a good ai for my texas holdem poker game
Profile icon
hadthelad

so im trying to make a poker game (texas holdem) and i dont really know how to make the ai know when to stay, fold, and raise. is there a way i could make it so if the computer has good cards then stay but if they have bad cards they fold and if they have really good cards then they raise. is there a way to do this. https://repl.it/@hadthelad/poker-Texas-holdem#main.py

Answered by Muffinlavania [earned 5 cycles]
View Answer
Voters
Profile icon
hadthelad
Comments
hotnewtop
Profile icon
Muffinlavania

I dont know poker.. but you use if statements

def smartcomputer():#Call this when you want it to judge if (good card roll) or (other good card roll): #Then do whatever for the hand #LIKE if opponent_cards=[4,5,6]: draw(2) #IDK something
Profile icon
hadthelad

@Muffinlavania
oh thanks man

Profile icon
Kandagor

You need to contact the developers of other successful poker games with this question. I think only they can answer all your questions. I am engaged in creating applications and games, but I am currently at the initial stage and will not be able to answer all your questions regarding ai. But I am studying gambling, and so far, I like the design of the game the most of all poker games https://sunpower-world.com/. She's probably one of the best. Look at the AI in this game, and maybe you will find the answer to your question.