Poker-AI.org

Poker AI and Botting Discussion Forum
It is currently Mon Nov 13, 2023 11:57 am

All times are UTC




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: need help with boot
PostPosted: Wed Dec 11, 2019 1:27 pm 
Offline
New Member

Joined: Wed Dec 11, 2019 1:13 pm
Posts: 1
Code:
hello everyone
----------------------------------
Decision-making is an algorithm for deciding on the action of a bot, rather a logical task and a separate topic, so we will consider it in the next article in this series.
Simulation of user actions-simulation of pressing buttons by the user, simulation of mouse movements.


In this article we will talk about input / output of information-the main software modules of a poker bot.

Obtaining information

Here are our main sources of information:

Log files-for each client it is individual, but often actions (dealt cards, actions of players) are recorded in a log file, which can be constantly re-read from the disk and instantly receive the necessary information.
API messages-here you can find a lot of useful information, the most interesting part is the text output. Almost all poker clients have a text element on the table that combines the functions of a chat and an information window. If necessary, it can display all the information on the hands (players ' actions, their cards, table cards, etc.). It looks something like this:
-------------------------------
Code:
MSG_TABLE_SUBSCR_ACTION
MSG_TABLE_SUBSCR_DEALPLAYERCARDS
sit0
nCards=2
sit1
nCards=2
sit2
nCards=2
sit3
nCards=2
sit4
nCards=2
sit5
nCards=2
dealerPos=3
TableAnimation::dealPlayerCards
MSG_TABLE_PLAYERCARDS 000C0878
::: 11c
::: 11d

Code:
BOOL WINAPI SetHook() {
  g_hook = SetWindowsHookEx(WH_CBT, (HOOKPROC) CBTProc, g_hinstDll, 0);
  return (g_hook != NULL);
}

LRESULT WINAPI CBTProc(int nCode, WPARAM wParam, LPARAM lParam) {



* This source code was highlighted with Source Code Highlighter.

* This source code was highlighted with Source Code Highlighter.[/code]
This function can be used not only for any movement and pressing of buttons, but also for working with the keyboard. To do this, we need to pass a similar structure to KEYBDINPUT, although we won't need to use the keyboard most often.

Here we have analyzed the input and output of information, which are the basis for all program actions of the bot. In the next part, we will analyze the decision-making module-the basis of the bot's logic, consider the different strategies that can be applied to our program.


Attachments:
1111111111111.jpg
1111111111111.jpg [ 460.28 KiB | Viewed 5777 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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