Poker-AI.org
http://poker-ai.org/phpbb/

Using Pokersource Java layer
http://poker-ai.org/phpbb/viewtopic.php?f=22&t=2721
Page 1 of 1

Author:  Corphorr [ Wed Mar 19, 2014 10:24 am ]
Post subject:  Using Pokersource Java layer

Hi, I am writing a poker AI and wish to use the Java layer of pokersource (for the SAIE calculator)
I have less experience in Java compared to C++ and am having trouble using the library beyond the 'Deck' class.

My question is in more detail here on stackoverflow:
http://stackoverflow.com/questions/2247 ... ry-in-java

I hope it is okay to post such a question here.

Thank you.

Edit: I have tried compiling the C libraries myself and looking at different versions of the library to see if I could find some kind of file named 'poker' or 'pokerjni' but to no avail.
I would be very grateful if someone can help here as I am starting to feel completely hopeless, I have spent many hours now trying to figure out something that is probably very simple.

Author:  Corphorr [ Tue Mar 25, 2014 9:28 am ]
Post subject:  Re: Using Pokersource Java layer

Otherwise, would somebody be able to recommend a different library that will be able to compute subjective all-in equity?

Author:  spears [ Tue Mar 25, 2014 10:48 am ]
Post subject:  Re: Using Pokersource Java layer

- Did you find this discussion http://poker-ai.org/archive/www.pokerai ... ?f=3&t=353 ?
- Is SAIE = strength of range v range? If so, it should be possible to build that on top of any hand evaluator quite quickly http://poker-ai.org/phpbb/viewtopic.php?f=24&t=2390

Author:  Corphorr [ Wed Apr 02, 2014 5:30 pm ]
Post subject:  Re: Using Pokersource Java layer

Thank you very much for your reply.
I have spent a few hours trying to figure out how to use this PSim library.

I tried using it with Java but got some error about using a 32-bit DLL on a 64-bit system, decided to just move to c++ because I have more experience using it.

I managed to do something with poker-eval-138 using cygwin then I compiled PSim as a static library (I think, I ended up with a .lib)

Now I used '#include "psim.hpp"' in my program and when trying to use the SimulateHand function as he gives in the examples, I get these errors:

Code:
1>psim.lib(psim.obj) : error LNK2001: unresolved external symbol _StdDeck_cardMasksTable
1>psim.lib(simulate.obj) : error LNK2001: unresolved external symbol _topFiveCardsTable
1>psim.lib(simulate.obj) : error LNK2001: unresolved external symbol _StdDeck_stringToCard
1>psim.lib(simulate.obj) : error LNK2001: unresolved external symbol _topCardTable
1>psim.lib(simulate.obj) : error LNK2001: unresolved external symbol _straightTable
1>psim.lib(simulate.obj) : error LNK2001: unresolved external symbol _nBitsTable
1>psim.lib(simulate.obj) : error LNK2001: unresolved external symbol "unsigned char * nBitsAndStrTable" (?nBitsAndStrTable@@3PAEA)


I think these belong to the poker-eval library, so I must have done something wrong.
I didn't end up with a .lib for poker-eval, I just did './configure make install' with cygwin and linked my Visual Studio to the 'include' and 'lib' directories for it.

I'm not sure why I am finding this whole library stuff so confusing.
Thanks for reading.

Author:  spears [ Thu Apr 03, 2014 10:20 am ]
Post subject:  Re: Using Pokersource Java layer

The last serious C++ development I did was 20 years ago so I can't help you with that. Looking around I see other people have had problems building 64 bit dlls too. But since your target seems to be Java why not just build what you want on top of the Java evaluator I referenced earlier, or one of the others in that thread? Quite a few are faster than poker-source

Author:  winnie [ Thu Dec 03, 2015 9:02 pm ]
Post subject:  Re: Using Pokersource Java layer

hi,

did anyone has some luck to compile the psim as a 64bit dll? Tried it for days now and getting nearly the same errors as Corphorr.

My Christmas wish for 2015: A C++ god will post a 64 bit dll ;)

thx

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/