Image Image Image




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 
Author Message
 Post subject: New forum: Human-like-Mouse discussions
PostPosted: Fri Jul 04, 2008 8:23 pm 
Offline
PokerAI fellow
User avatar

Posts: 7731
Favourite Bot: V12
OK people: Enough mouser discussions. All these are going now to a dedicated sub-forum: To the HCI-Discussion forum.

How to join this HCI-discussion forum?
Continiue to read - this and the next post - to find out how to the forum.

The "HCI-Discussion" forum is for discussions on technical and behavioural mouse, keyboard, and so on analysis. It is separate from our private forums that you were seeing so far: This allows us to keep the existing research separate, but offer more people the opportunity to join with contributions. The entry requirement for this place will be that you record 10 hours of human play and contribute it (except if you do not provide other meaningful contribution). If you choose to contribute recorded hours, then read the next post on how exactly to do that.

Some info about scope of the research can also be found here: http://pokerai.org/research
The final outcome (at some point) of this project will be to release a public mouser.dll, that one can use to simulate human-like mouse movements for any purpose.

_________________
indiana


Top
 Profile E-mail  
 
 Post subject: Re: Regarding Human-like-Mouser discussions
PostPosted: Fri Jul 04, 2008 9:40 pm 
Offline
PokerAI fellow
User avatar

Posts: 7731
Favourite Bot: V12
Here is the latest version for the mouse logger, Source code + Executable:
http://pokerai.org/files/_hci/MouseLog22.zip

Version of the source that can be compiled with Visual Studio 2008 (the port is discussed in this thread, thanks to casey999):
http://pokerai.org/files/_hci/MouseLogg ... 008prj.zip
(Or this one, which is also able to dump images with print screen: viewtopic.php?f=3&t=2136&p=17133, thanks to T-Helen)

How-to use the MouseLog program to record data:

1) Setup tables
2) Start logger
3) Play like normal, but try not to move tables during play if you can help from it
4) When you're done, Ctrl-Alt-Q to quit logging before you exit the casino software
5) Make some screenshots of your setup (anonymyse it) when fold/call/etc buttons are visible:
* This is very IMPORTANT to help us know where the buttons actually are, so they need to be visible. Not that if you have a setup with four tables e.g.you may need to take four screenshots to fullfill this goal.

The log file is in the format:
-----
"New Session" Date Time
Screen Size
MessageCode X Y Window Time
...
"Session Over" Date Time

MessageCode is Windows standard message codes, and should be one of the following as defined in windows.h.
Code:
#define WM_MOUSEMOVE 512
#define WM_LBUTTONDOWN 513
#define WM_LBUTTONUP 514
#define WM_LBUTTONDBLCLK 515
#define WM_RBUTTONDOWN 516
#define WM_RBUTTONUP 517
#define WM_RBUTTONDBLCLK 518
#define WM_MBUTTONDOWN 519
#define WM_MBUTTONUP 520
#define WM_MBUTTONDBLCLK 521
#define WM_MOUSEWHEEL 522 ///<I'm filtering the mouse wheel out, so you don't get that.


X and Y are the position. The hook actual grabs the mouse position before Windows clips it, so you can have negative numbers and numbers bigger than the screen size. I didn't clip them because I thought they may be useful for something later. Just keep it in mind.

Window is what window HWND the mouse was over when the message was hooked. I thought this might help in analyzing the data later. We'll be able to tell if the mouse was clicking on the same button or a different one (assuming the client uses standard Windows buttons).

Time is the time in seconds.


Other things to consider:

Check what is your mouse rate reported, with this program:
http://pokerai.org/files/_hci/mouserate.zip

If it's 110 Hz and above, you're all right. If its 50-60 Hz, then it won't be very good for mouse measurements. If your VMWare image is Windows XP, then usually you should have no issues.


How to programatically produce logs in the MouseLog format:

Start with an empty text file and then add:

New Session - Any Text Title
XResolution YResolution

Then make each move on a new line like:
512 X Y 0 Time

For example a couple moves (code 512) may look like:
512 327 294 0 0.5760
512 322 284 0 0.5840
512 316 274 0 0.5920
512 310 264 0 0.6000

Then at the end of each path put in a mouse down and up commands (513 and 514):
513 310 264 0 0.8560
514 310 264 0 0.9440


If you want to compile the coding

(this is writen by Timmy, so below "I" = Timmy).

If you want to compile the coding, but not use the already available executable, then follow these instrictions:

A) Get the Automated MinGW Installer from here.
When it's installing make sure you grab the g++ package. And install it to the default path.
After it installs you'll need to add C:\MinGW\bin and C:\MinGW\libexec\gcc\mingw32\3.4.5 to your path.
Then you just do:
dllwrap MouseLog2.cpp -o ML2.dll
g++ MouseLog2.cpp -o MouseLog2.exe

There, unless you're a lot smarter than me, I just saved you like 2 hours of frustration. I have no idea why they have to make these things so hard, or why a C++ program will compile fine for one compiler, but not for another.

B) Removing the boost dependency
To compile the program, you need the C++ Boost library. It's incredibly useful, but a little tricky to install.

If you want to get rid of the boost dependency, try this:

1) Remove the #include <boost/format.hpp> line
2) Find
Code:
                //We could use the message post time, but it's crap for accuracy.
                log << wParam << " " << mouse->pt.x << " " << mouse->pt.y << " " << wm[win] << " " << (boost::format("%0.4f") % time());
and replace with
Code:
                //We could use the message post time, but it's crap for accuracy.
                char formatedTime[50];
                std::sprintf(formatedTime, "%0.4f", time());
                log << wParam << " " << mouse->pt.x << " " << mouse->pt.y << " " << wm[win] << " " << formatedTime;
That should compile OK and produce the exact same output.

BTW, if you want to compile some of the other code I've uploaded you'll have to install Boost. I use it constantly.

If you want to compile the code with Visual Studio 2008

You just need to download the source distribution in the top of this post, open the solution (sln) file under Visual Studio 2008, and compile it. The output is in the release folder.

_________________
indiana


Top
 Profile E-mail  
 
 Post subject: Re: Regarding Human-like-Mouser discussions
PostPosted: Fri Jul 04, 2008 9:41 pm 
Offline
PokerAI fellow
User avatar

Posts: 7731
Favourite Bot: V12
OK, I just wanted to post some teaser for all this.

We are doing a lot of research on these things. Analysing and reproducing things like clicking, meaningful mouse trajectory, etc, isn't very easy, so we're doing a focused effort on that (and btw - for comparison - most of the stuff you'll find in the internets on this topic - is crap):

Attachment:
xMouseLog_UB_pokermathy_mouse_preview.JPG
xMouseLog_UB_pokermathy_mouse_preview.JPG [ 25.86 KB | Viewed 13572 times ]


Attachment:
mouse.JPG
mouse.JPG [ 29.83 KB | Viewed 13548 times ]

_________________
indiana


Top
 Profile E-mail  
 
 Post subject: Re: Regarding Human-like-Mouser discussions
PostPosted: Fri Jul 04, 2008 9:42 pm 
Offline
PokerAI fellow
User avatar

Posts: 7731
Favourite Bot: V12
<reserved for later>

_________________
indiana


Top
 Profile E-mail  
 
 Post subject: Re: Regarding Human-like-Mouser discussions
PostPosted: Sat Jul 05, 2008 4:12 pm 
Offline
Senior member
User avatar

Posts: 247
Quote:
The entry requirement for this place will be that you record 10 hours of human play and contribute it (except if you do not provide other meaningful contribution).

Do my earlier contribution of recorded mouse movement fill the requirements or do I need to record more play?


Top
 Profile E-mail  
 
 Post subject: Re: Regarding Human-like-Mouser discussions
PostPosted: Sat Jul 05, 2008 4:34 pm 
Offline
PokerAI fellow
User avatar

Posts: 7731
Favourite Bot: V12
No, your earlier contribution is still one of the best we have (excluding the lack of a screenshot), and it helped a lot. I'm adding you in a minute.

_________________
indiana


Top
 Profile E-mail  
 
 Post subject: Re: Regarding Human-like-Mouser discussions
PostPosted: Sat Aug 23, 2008 6:26 pm 
Offline
New member
User avatar

Posts: 5
Location: Montpellier
Favourite Bot: Mine
The website http://pokerai.org/research appears to be really interesting!

But I cannot download or see any document... :(

Maybe I am missing something ?


Top
 Profile E-mail  
 
 Post subject: Re: Regarding Human-like-Mouser discussions
PostPosted: Sat Aug 23, 2008 6:41 pm 
Offline
PokerAI fellow
User avatar

Posts: 7731
Favourite Bot: V12
There is no document that we have put for download. This page is under construction. If you are interested in these topics - reread this thread from the beginning. This is the only option for now.

_________________
indiana


Top
 Profile E-mail  
 
 Post subject: Re: Regarding Human-like-Mouser discussions
PostPosted: Sat Aug 23, 2008 10:37 pm 
Offline
Senior member
User avatar

Posts: 189
Favourite Bot: My own
I am currently producing a module of my botting library to create ficticious mouse movements. It works by sort of idling mouse movements between client windows, then pausing to let the actual bot take over.

Im struggling with deviating the actual mouse movement (like making a movement from position x to position y not go completely straight in a believable fashion). I can think of some mathmatical techniques to solve this, but as I said its proving slightly harder to do than i thought.

Anyone got any advice?

I am planning on making the mouseManager library open source when i finish it and will probably post it on these forums if no-one has any objections.

HP


Top
 Profile E-mail  
 
 Post subject: Re: Regarding Human-like-Mouser discussions
PostPosted: Sat Aug 23, 2008 11:14 pm 
Offline
PokerAI fellow
User avatar

Posts: 7731
Favourite Bot: V12
Potato,

It is a bit beyond "slightly harder". We have more or less solved this, but now go back to post #1 and post #2 in this thread. I would like to have all mouser discussions in the dedicated sub-forum for that (HCI-discussion).

You can also check above "How to programatically produce mouse logs". Get an algorithm to move from (200, 500) to (1000, 500) and back continiously, generate 50000 paths, and send it back. Instead of moving between two fixed points, you can as well move between random points on the screem, or just take the log of an actual bot play. We can then find and point out leaks in your path (moves) generation algorithms.

_________________
indiana


Top
 Profile E-mail  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 10 posts ] 


Who is online

Users browsing this forum: No registered users and 14 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:
Jump to: