AI Poker Contest

Started by
15 comments, last by GameDev.net 19 years, 3 months ago
I've been thinking about this a little.

One thing everyone is going to need to consider, is the ai needs to be scalable. What I mean is, the ai for a heads up game plays a bit looser than a half table (5 people) or a full table (10 people) just a tidbit for all those who plan to make a competitive ai need to think about.

Dwiel if you have any questions/need suggestions feel free to ask, as I'm a huge poker fan and consider myself a fairly decent player. Hopefully I have time to be apart of this, although things are becomming hectic. If not I'd love to write up some quick pseudo code as to how I'd implment it for anyone that wants to go ahead and implment a more complete version.

Advertisement
Standard input and output streams can be used to allow all languages and still have the bots running all the time (they can keep logs or whatever).

The dealer program opens a pipe to all the bots and sends them input and waits for output. The bots themselves can just use iostreams, printf/scanf, or any other standard io avaliable in the language.
That sounds great AP, only I am going to need to have one 'dealer' program with many players or bots. I'm not sure how I would send info from the dealer to the player back to the dealer to the next player, back to the dealer, etc. Could you use an example?

Thanks.

I simple C interface shouldbe up soon.

Dwiel
http://www.rt.com/man/popen.3.html

Open each program as a FILE* resource, and then use fscanf and fprintf to send text to and from it. All the bot programs will just use scanf and fprintf (or System.out.println or whatever is avaliable) to send text as well.

The commands would be simple text lines telling about the moves and visible cards of other players or sending your own moves to the server. The pipe calls (and scanf in the bots) will block until there is input, so the thing can be run in a simple loop (print other moves, both wait and read the move from bot with fscanf). The same applies to the bots.
The lang i'm using (VB6, a RAD language makes short work of problems like this :)) dosn't have any handling of Input/output streams. Arguments yes, not streams. (Windose GUI only, but i'm probably not going to need to open a window [grin]).

Hence why i asked for my approach, it makes sure that i can play too :p
It'll compile into an activex dll, tho.

From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
I will do both. First dll support, then I will get the piping to work. I didn't realize it was that easy.

Thanks for the info!

Although from what the article says, you can only open a file for reading OR writing, not both. would I need to open the file twice? That seems like it would invoke the program twice...

Sorry if I am missing something simple.

Will have a dll version available soon

Dwiel
From this tutorial: http://www.tldp.org/LDP/lpg/node9.html
Quote:Two way pipes can be created by opening up two pipes, and properly reassigning the file descriptors in the child process.


I'm not sure how that would be done exactly, but it is possible.

This topic is closed to new replies.

Advertisement