Poker-AI.org

Poker AI and Botting Discussion Forum
It is currently Mon Nov 13, 2023 1:40 pm

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Sun Jan 26, 2014 12:31 pm 
Offline
Junior Member

Joined: Sun Jul 07, 2013 11:13 am
Posts: 49
I am working on my testbed where I use PokerAcademy 2.5 and a Meerkat combot written in Java to communicate with my bot written in C#. Now I need to find a way to set the bankroll for any player on the table.

In Meerkat documentation it says that in class PlayerInfo there is a method setBankRoll(double br), which seems to be just what I need. But when I try to use that method in the Java combot, the method is not found. I am not really a Java programmer, so I might be doing something wrong.

This is how I tried to use setBankRoll() in the gameStartEvent of the combot:
Code:
   public void gameStartEvent(GameInfo gInfo) {
      this.gi = gInfo;
      String s = new String("");
      s = String.format("01;%d;%4.2f;%d;%d;%d;\n",BotId,gi.getBigBlindSize(),gi.getNumPlayers(),gi.getButtonSeat(),gi.getGameID());
      ComSend(s);
      for (int seat = 0;seat < 10; seat++) {
         if (gi.inGame(seat)) {
            s = String.format("02;%d;%d;%s;%4.2f;\n",BotId,seat,gi.getPlayer(seat).getName(),gi.getPlayer(seat).getBankRoll());
            PlayerInfo pi = gi.getPlayer(seat);
            pi.setBankRoll(100.0);   // Can not resolve method!!!
            ComSend(s);
         }
      }
   }



How can I set the bankroll for players?


Top
 Profile  
 
PostPosted: Sun Jan 26, 2014 7:59 pm 
Offline
Junior Member

Joined: Sun Mar 03, 2013 12:09 pm
Posts: 14
Hi,

I did some simulations against PokerAcademy many years ago.

It was so long ago (about 10 years!) that my info may be totally out of date.

However - I have some ancient source I was using at the time - and it looks like I was using an alternative method setBankRollAndSave eg :

PlayerInfo p = gi.getPlayerInfo(i); // gi is the GameInfo
p.setBankRollAndSave(100.0*sizeofbb);

Maybe it stayed the same?

Good luck.

PeppaPig


Top
 Profile  
 
PostPosted: Sun Jan 26, 2014 9:28 pm 
Offline
Junior Member

Joined: Sun Jul 07, 2013 11:13 am
Posts: 49
I found the poker.PlayerInfo.setBankRoll() and poker.PlayerInfo.setBankRollAndSave() and a lot of other handy setXXXX methods in the documentation that is shown when I open the file 'index-all.html'. But when looking at the meerkat-api.jar file in eclipse package explorer, I can find none of the setXXXX methods in the PlayerInfo class. And the PlayerInfo class is under namespace com.biotools.meerkat. There doesn't seem to be any namespace 'poker' at all.

If I open the file allclasses-frame.html, I get documentation for namespace com.biotools.meerkat where there are no setXXXX methods at all. This documentation corresponds to what I see in the eclipse package explorer.

I am beginning to suspect that all the handy setXXXX methods I found in index-all.html belong to some older version of the Meerkat API and version 2.5 (which I believe I have) has been changed to become almost exclusively read-only and that there is no way to set values such as bankroll from a bot. I really hope I am wrong, because that would mean big trouble for me. :shock:

Is it at all possible to set a players bankroll via Meerkat in PokerAcademy 2.5 ?

If not, what should I do? Maybe downgrade to a previous version of PA? Where do I find such a version, and what bugs does it have? Any other ideas?


Top
 Profile  
 
PostPosted: Sun Jan 26, 2014 10:18 pm 
Offline
Site Admin
User avatar

Joined: Sun Feb 24, 2013 9:39 pm
Posts: 642
Seikez wrote:
Is it at all possible to set a players bankroll via Meerkat in PokerAcademy 2.5 ?


I don't have PA handy at the moment so I can't be 100% sure about what I'm saying. I seem to remember Marc Ponsen asking how to do this and I suggested using Autoit. It's an ugly solution and I wouldn't have suggested it if there was a straightforward way. As I remember he was quite happy.

The unresolved method error message is quite interesting though. I think that can only occur at compilation time or if you are using reflection.

I've attached some older versions of the meerkat api that might or might not be useful

Maybe you could use Open Meerkat TestBed


Attachments:
Meerkat-API-2.0.zip [258.34 KiB]
Downloaded 553 times
Meerkat-API-1.5.1.zip [236.34 KiB]
Downloaded 560 times
Top
 Profile  
 
PostPosted: Mon Jan 27, 2014 10:30 am 
Offline
Junior Member

Joined: Sun Jul 07, 2013 11:13 am
Posts: 49
Thanks PeppaPig and spears for your input so far.

I have now looked at the contents of the meerkat-api.jar file in API versions 1.5.1 and 2.0 and the 'poker' namespace is there as indicated by documentation in the 'index-all.html'. This namespace is not present in the 2.5 .jar. So it seems API version 2.5 is radically different from the earlier versions and that there is no way to set player bankroll programmatically via the API for PA 2.5. What a pity they made that change!

I don't know yet how I am going to solve this. Open Testbed is one option I might have a look at. Or maybe I will just grab the bull by it's horns and implement some remote control thingy that allows me to control PA running in a VM from my C# app running on the host. Something like this will have to be done sooner or later anyway when I start playing on the poker sites.

It's interesting (and a little scary) how one thing tends to lead to at least one more thing when developing a bot. I realize now that developing a bot that can successfully play online will take years, not months.


Top
 Profile  
 
PostPosted: Mon Jan 27, 2014 11:03 am 
Offline
Site Admin
User avatar

Joined: Sun Feb 24, 2013 9:39 pm
Posts: 642
Quote:
control PA running in a VM from my C# app running on the host
Use AutoIt to reset bankroll


Top
 Profile  
 
PostPosted: Mon Jan 27, 2014 4:14 pm 
Offline
Junior Member

Joined: Sun Jul 07, 2013 11:13 am
Posts: 49
Quote:
Use AutoIt to reset bankroll

I have considered that, and it is an attractive solution if I look at only the testbed. But that would mean I have to develop two parallel ways to control programs running on a VM. One for my testbed where AutoIt can run on the VM and control PokerAcademy. And another way for my online play where I need a high stealth method to control the poker client.

As far a I understand it, AutoIt has to run on the same machine as the program it controls in order to find buttons, textboxes and so on. If AutoIt runs on the same VM as the poker client, the client would discover it and yell BOT! Unless of course there is a secure way that I don't know of to hide AutoIt from the poker client and still have it control the client. Is there such a way?


Top
 Profile  
 
PostPosted: Mon Jan 27, 2014 4:52 pm 
Offline
Site Admin
User avatar

Joined: Sun Feb 24, 2013 9:39 pm
Posts: 642
Yes, you would have to develop two parallel solutions. But resetting the bankroll in PA with AutoIt is a really simple task. I saw the code once and it was only about 20 lines.


Top
 Profile  
 
PostPosted: Sat Mar 08, 2014 12:36 am 
Offline
Regular Member
User avatar

Joined: Tue Mar 05, 2013 9:19 pm
Posts: 50
Any luck? I'm attempting the same thing now.

The post spears was referring to was possibly this one:
http://poker-ai.org/archive/www.pokerai.org/pf3/viewtopicc02a-3.html?f=3&t=2942

However, as expected it doesn't seem to work out the box so will need a little tweaking. I'm going to have a go although i'm a newbie to Autoit, looks like it should just be some small changes to x,y locations..?


Top
 Profile  
 
PostPosted: Sat Mar 08, 2014 11:12 am 
Offline
Junior Member

Joined: Sun Jul 07, 2013 11:13 am
Posts: 49
Since Autoit can't be used in the same VM where the poker client is running, I have decided to take the long route, over the hills and into the valleys, as I always seem to do. So I am implementing a screen scraper / control app that allows me to find objects on a screen image, read text from it and click buttons and other stuff. A bit like a crossbreed between OpenHoldem scraper and a highly optimized and enhanced SikuliX with a VNC-client built into it. I am afraid this will all take time though, a lot of time. The VNC part is finished. Now I am trying to wrap my brains around image processing and OpenCV.


Top
 Profile  
 
PostPosted: Sun Mar 09, 2014 2:35 am 
Offline
Regular Member
User avatar

Joined: Tue Mar 05, 2013 9:19 pm
Posts: 50
Just as an update, I've managed to get the AutoIt script to work (although it's changed quite a lot, it uses the same ideas). Also found an easy way of getting hand histories from PA using the Open Testbed hh writer, much easier than translating the PA ones.. although it does require running your own bot.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group