Menu

Adapting pyTBot

dwgharris
2004-11-02
2013-04-09
  • dwgharris

    dwgharris - 2004-11-02

    Hiya,

    I've been looking for a dealing engine that I can use to play with some AI bots for some time now. This looks ideal!

    The thing is, I'm not a python user (yet). How easy would it be for me to modify this so that instead of operating via IRC, it calls a C++ function that makes a raise, call, pass decision?

     
    • Paul Rotering

      Paul Rotering - 2004-11-02

      Theoretically, this should be relatively easy.

      Pytbot talks to the world through 4 functions:
        Tourney.incmd() - accepts incoming commands of class        Command

       
    • Paul Rotering

      Paul Rotering - 2004-11-02

      Theoretically, this should be relatively easy.

      Pytbot talks to the world through 4 functions:
        Tourney.incmd() - accepts incoming commands of class        Command

         pubout(), privout(), noteout(): Three functions pytbot uses to talk send outgoing messages.  The reason there are these three are due to weirdnesses of IRC.  There's no reason you can't use just one function for outgoing messages.

         You will have to define and pass references to these (outgoing) functions to Tourney.init() when you instantiate a tournament (see the definition of Tourney.__init__() to see the parameters it expects).  Another, less confusing route might be to define a single function in the tournament class for outgoing messages and just use that.

      How to integrate Python with C/C++?  While I know it's done all the time, I have no experience doing it.  Here's a link which I think applies to what you want to do:  http://www.python.org/doc/2.3.4/ext/intro.html

      Please let us know how this works out (assuming it does)!   I'd love to have bots duking it out on ircpoker.com.

       
    • dwgharris

      dwgharris - 2004-11-03

      Will do... although I'll leave it to you to work out how to link the bots to IRC :)

       

Log in to post a comment.

MongoDB Logo MongoDB