Poker-AI.org http://poker-ai.org/phpbb/ |
|
need help with boot http://poker-ai.org/phpbb/viewtopic.php?f=24&t=3288 |
Page 1 of 1 |
Author: | Rits223 [ Wed Dec 11, 2019 1:27 pm ] | ||
Post subject: | need help with boot | ||
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.
|
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |