dickreuter / Poker

Fully functional Pokerbot that works on PartyPoker, PokerStars and GGPoker, scraping tables with Open-CV (adaptable via gui) or neural network and making decisions based on a genetic algorithm and montecarlo simulation for poker equity calculation. Binaries can be downloaded with this link:
http://www.deepermind-pokerbot.com
GNU General Public License v3.0
2.01k stars 506 forks source link

Linux Porting #45

Closed DanteCpp closed 6 years ago

DanteCpp commented 7 years ago

Hello, I am trying to run the pokerbot on linux, I solved all the dependencies. However running the program I get the following error:

dante@dante-pc:~/Workspace/Poker$ python3 main.py
This is a testversion and error messages will appear here. The user interface has opened in a separate window.
[Errno 2] No such file or directory: 'pics/PP/3h.png'
Tesseract not installed. Please install it into the same folder as the pokerbot or alternatively set the path variable.
dante@dante-pc:~/Workspace/Poker$

Why does it behave like that?

Regards, Dante.

dickreuter commented 7 years ago

As it says. You need to install tesseract. On Thu, 4 May 2017 at 14:17, Dante Loi notifications@github.com wrote:

Hello, I am trying to run the pokerbot on linux, I solved all the dependencies. However running the program I get the following error:

dante@dante-pc:~/Workspace/Poker$ python3 main.py This is a testversion and error messages will appear here. The user interface has opened in a separate window. [Errno 2] No such file or directory: 'pics/PP/3h.png' Tesseract not installed. Please install it into the same folder as the pokerbot or alternatively set the path variable. dante@dante-pc:~/Workspace/Poker$

Why does it behave like that?

Regards, Dante.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/dickreuter/Poker/issues/45, or mute the thread https://github.com/notifications/unsubscribe-auth/ABMrfo66exOWFxKbfca4NnaB-qovLpA8ks5r2c_rgaJpZM4NQp_7 .

DanteCpp commented 7 years ago

tesseract is already installed, moreover it is possible to run it from everywhere in the filesystem. In which file is tesseract mainly use?

dickreuter commented 7 years ago

Is there a Linux version of partypoker at all? The proble in this case is that Linux is case sensitive with the file names while windows is not. That's why it cannot find the file. You need to make sure it looks for upper case file names in the suits. On Thu, 4 May 2017 at 20:09, Dante Loi notifications@github.com wrote:

tesseract is already installed, moreover it is possible to run it from everywhere in the filesystem. In which file is tesseract mainly use?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/dickreuter/Poker/issues/45#issuecomment-299280824, or mute the thread https://github.com/notifications/unsubscribe-auth/ABMrfja-AZFJ6P2B2sqKW4zHdTfvT8Pmks5r2iKBgaJpZM4NQp_7 .

DanteCpp commented 7 years ago

Is there a Linux version of partypoker at all?

There isn't, but my purpose is to run the bot on Linux ad the pokergame on a VM. Otherwise I should execute the bot on a virtual macine, and the game on a nested one. I did a try changing the name of 'pics/PP/3H.png' by 'pics/PP/3h.png'. But the program got crazy... May you point out where these operation have place? So that I can change some code...

dickreuter commented 7 years ago

Somewhere in /table_analysers/base.py around line line 39. But you will have many more problems with Linux. Starting from making screenshots to moving the mouse. It will need a lot of work I think.

On Thu, 4 May 2017 at 20:21, Dante Loi notifications@github.com wrote:

Is there a Linux version of partypoker at all?

There isn't, but my purpose is to run the bot on Linux ad the pokergame on a VM. Otherwise I should execute the bot on a virtual macine, and the game on a nested one. I did a try changing the name of 'pics/PP/3H.png' by 'pics/PP/3h.png'. But the program got crazy... May you point out where these operation have place? So that I can change some code...

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/dickreuter/Poker/issues/45#issuecomment-299283763, or mute the thread https://github.com/notifications/unsubscribe-auth/ABMrfryQus6lsnv5rcO6IVWKJdY4sW_8ks5r2iVJgaJpZM4NQp_7 .

DanteCpp commented 7 years ago

Thanks, however I already solved the screenshots and the mouse issues.

dickreuter commented 7 years ago

Great. You're welcome to do a pull request if you Make it compatible with both windows and Linux so others can benefit as well from your work.

On Thu, 4 May 2017 at 20:27, Dante Loi notifications@github.com wrote:

Thanks, however I already solved the screenshots and the mouse issues.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/dickreuter/Poker/issues/45#issuecomment-299285025, or mute the thread https://github.com/notifications/unsubscribe-auth/ABMrfqHk-oqLI67B_a-EBV_iHebxn6NEks5r2iaBgaJpZM4NQp_7 .

ghost commented 7 years ago

Please do Dante !

DanteCpp commented 7 years ago

Somewhere in /table_analysers/base.py around line line 39.

The method load_templates(self, p) works in the directory pic/SN, in the file base.py there isn't actions into pic/PP.

BTW It will be a pleasure for me marge the versions... XD

dickreuter commented 7 years ago

It works in /sn because your strategy is set to pokersnowie. Select the default strategy for example and it will look for PartyPoker (/PP)

DanteCpp commented 7 years ago

How can I choose the strategy? Furthermore it'd be useful to know how the program should behave at start up time, (without the pokergame opened).

When I run the program whit python3 main.py, I get

This is a testversion and error messages will appear here. The user interface has opened in a separate window.
<class 'KeyError'> 'COMPUTERNAME' <traceback object at 0x7fe5c1ad2808>
main - ERROR - <class 'KeyError'>
main - ERROR - 'COMPUTERNAME'
main - ERROR - <traceback object at 0x7fe5c1ad2808>
...
File "main.py", line 248, in exception_hook
    sys.__excepthook__(exctype, value, traceback)
...
File "main.py", line 244, in exception_hook
    logger.error(str(exctype))
Message: "<class 'KeyError'>"
Arguments: ()
Fatal Python error: Cannot recover from stack overflow.

Thread 0x00007fe5a37fe700 (most recent call first):
  File "/home/dante/.local/lib/python3.5/site-packages/pymongo/periodic_executor.py", line 125 in _run
  File "/usr/lib/python3.5/threading.py", line 862 in run
  File "/usr/lib/python3.5/threading.py", line 914 in _bootstrap_inner
  File "/usr/lib/python3.5/threading.py", line 882 in _bootstrap
...
Current thread 0x00007fe5f0760700 (most recent call first):
  File "/usr/lib/python3.5/logging/__init__.py", line 381 in usesTime
  File "/usr/lib/python3.5/logging/__init__.py", line 537 in usesTime
  File "/usr/lib/python3.5/logging/__init__.py", line 569 in format
  File "/usr/lib/python3.5/logging/__init__.py", line 831 in format
  File "/usr/lib/python3.5/logging/__init__.py", line 981 in emit
  File "/usr/lib/python3.5/logging/__init__.py", line 1049 in emit
  File "/usr/lib/python3.5/logging/handlers.py", line 73 in emit
  File "/usr/lib/python3.5/logging/__init__.py", line 856 in handle
  File "/usr/lib/python3.5/logging/__init__.py", line 1488 in callHandlers

  File "/usr/lib/python3.5/logging/__init__.py", line 1426 in handle
  File "/usr/lib/python3.5/logging/__init__.py", line 1416 in _log
  File "/usr/lib/python3.5/logging/__init__.py", line 1309 in error
  File "main.py", line 244 in exception_hook
  File "main.py", line 248 in exception_hook
  File "main.py", line 248 in exception_hook
...
Aborted (core dumped)
dickreuter commented 7 years ago

This must be some issue with a package that doesn't support Linux On Tue, 9 May 2017 at 13:56, Dante Loi notifications@github.com wrote:

How can I choose the strategy? Furthermore it'd be useful to know how the program should behave at start up time, (without the pokergame opened).

When I run the program whit python3 main.py, I get

This is a testversion and error messages will appear here. The user interface has opened in a separate window. <class 'KeyError'> 'COMPUTERNAME' <traceback object at 0x7fe5c1ad2808> main - ERROR - <class 'KeyError'> main - ERROR - 'COMPUTERNAME' main - ERROR - <traceback object at 0x7fe5c1ad2808> ... File "main.py", line 248, in exception_hook sys.excepthook(exctype, value, traceback) ... File "main.py", line 244, in exception_hook logger.error(str(exctype)) Message: "<class 'KeyError'>" Arguments: () Fatal Python error: Cannot recover from stack overflow.

Thread 0x00007fe5a37fe700 (most recent call first): File "/home/dante/.local/lib/python3.5/site-packages/pymongo/periodic_executor.py", line 125 in _run File "/usr/lib/python3.5/threading.py", line 862 in run File "/usr/lib/python3.5/threading.py", line 914 in _bootstrap_inner File "/usr/lib/python3.5/threading.py", line 882 in _bootstrap ... Current thread 0x00007fe5f0760700 (most recent call first): File "/usr/lib/python3.5/logging/init.py", line 381 in usesTime File "/usr/lib/python3.5/logging/init.py", line 537 in usesTime File "/usr/lib/python3.5/logging/init.py", line 569 in format File "/usr/lib/python3.5/logging/init.py", line 831 in format File "/usr/lib/python3.5/logging/init.py", line 981 in emit File "/usr/lib/python3.5/logging/init.py", line 1049 in emit File "/usr/lib/python3.5/logging/handlers.py", line 73 in emit File "/usr/lib/python3.5/logging/init.py", line 856 in handle File "/usr/lib/python3.5/logging/init.py", line 1488 in callHandlers

File "/usr/lib/python3.5/logging/init.py", line 1426 in handle File "/usr/lib/python3.5/logging/init.py", line 1416 in _log File "/usr/lib/python3.5/logging/init.py", line 1309 in error File "main.py", line 244 in exception_hook File "main.py", line 248 in exception_hook File "main.py", line 248 in exception_hook ... Aborted (core dumped)

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/dickreuter/Poker/issues/45#issuecomment-300153929, or mute the thread https://github.com/notifications/unsubscribe-auth/ABMrfktCK6n23E98zbSWKJVI9db8fBIKks5r4GJggaJpZM4NQp_7 .

DanteCpp commented 7 years ago

Ok do you have any idea of where the problem is located in?

DanteCpp commented 7 years ago

The bot is finally running on linux!

screenshot from 2017-05-31 23-55-16

Tjorriemorrie commented 7 years ago

Please write a guide and do a PR. I would like to try it on mac

Madg33k commented 7 years ago

Could you please share your source or send guide? I want to run it under Ubuntu 16.04

DanteCpp commented 7 years ago

I am going to make it compatible for both linux and windows. Then I will share the code. Be patients!

iuvbio commented 7 years ago

Any development on this port Dante?

dickreuter commented 6 years ago

Is this still ongoing? Otherwise I’ll close it.