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

Mouse simulation with Arduino/Teensy
http://poker-ai.org/phpbb/viewtopic.php?f=26&t=3016
Page 1 of 1

Author:  pokerino4 [ Tue Jan 24, 2017 5:47 pm ]
Post subject:  Mouse simulation with Arduino/Teensy

Hi,
any of you have ever tried to simulate mouse movement using an Arduino or Teensy?

Author:  mlatinjo [ Wed Jan 25, 2017 5:25 pm ]
Post subject:  Re: Mouse simulation with Arduino/Teensy

Hi,

can you please explain how it works?

Author:  shalako [ Wed Jan 25, 2017 5:27 pm ]
Post subject:  Re: Mouse simulation with Arduino/Teensy

I have a Teensy and works pretty good. I used it for keyboard commands only and didnt try out the mouse functions however.

Author:  mlatinjo [ Wed Jan 25, 2017 11:02 pm ]
Post subject:  Re: Mouse simulation with Arduino/Teensy

What about recording mouse movements + Teensy? Would casino have a chance to detect that it is artificial mouse movement? I think that if you only use keyboard as input that it is a red flag for casino, because most of the users use mouse. I don't know anybody who uses keyboard while playing poker.

Author:  pokerino4 [ Wed Jan 25, 2017 11:11 pm ]
Post subject:  Re: Mouse simulation with Arduino/Teensy

mlatinjo wrote:
What about recording mouse movements + Teensy? Would casino have a chance to detect that it is artificial mouse movement? I think that if you only use keyboard as input that it is a red flag for casino, because most of the users use mouse. I don't know anybody who uses keyboard while playing poker.

Grinder play using keyboard! Is very difficult play 25-30x with a mouse!
What do you mean exactly with "recording mouse movements + teensy"?

Author:  mlatinjo [ Thu Jan 26, 2017 12:38 am ]
Post subject:  Re: Mouse simulation with Arduino/Teensy

Well I was once NL100 grinder and was never using keyboard, but ok maybe I would be better with keyboard :)
Also none of my poker friends use keyboard (also grinders) and I was watching at least 10 people playing online poker.

With recording mouse movements I meant to store in a (json) file, positions of the mouse and timestamp for the path between buttons.
E.g. moving mouse between fold button of table1 and raise button of table4 would be one path. So I would create app which has exactly the same size and positions of the tables as casino tables and exactly the same buttons where I click while playing, and then whenever I click on one button and then on another button I would create a "mouse movement path" and would store it in json file. So humans would be clicking on the buttons and I would store plenty of such paths in a file. Then when bot is playing, if I would need to move mouse from e.g. button fold on table1 to e.g. button raise on table4 I would find all possible paths stored in a json file and choose random one then simulate mouse movement exactly as human did. That way mouse movements would be very like human.
So since I would have such human-like mouse movements, if I would use Teensy to control mouse input, then casino wouldn't have a chance to detect that bot is moving a mouse?
what do you think?

Author:  pokerino4 [ Thu Jan 26, 2017 12:50 am ]
Post subject:  Re: Mouse simulation with Arduino/Teensy

mlatinjo wrote:
So since I would have such human-like mouse movements, if I would use Teensy to control mouse input, then casino wouldn't have a chance to detect that bot is moving a mouse?

This is the problem! If you use a Teensy mouse then the casino could see that you are using a Teensy, right?

Author:  mlatinjo [ Thu Jan 26, 2017 8:33 am ]
Post subject:  Re: Mouse simulation with Arduino/Teensy

Ok I didn't know that they could detect Teensy. Then I don't see the point of using Teensy if they could see it in our system? But if I would use two computers connected with "IOGEAR USB 2.0" so that casino client is running on one computer and bot on other computer and has mouse control of the second computer where casino is running. Could casino in that way notice that mouse input is not coming from human? If yes, what if I would use teensy on the computer where bot is running, in that case they couldn't see teensy as usb attached?

Author:  Code-Monkey [ Sat Feb 04, 2017 9:29 am ]
Post subject:  Re: Mouse simulation with Arduino/Teensy

in the old forum there was a crowd sourcing program on the forum to collect actual human mouse tracking of human play to then record and use for playback in a less artificial way. no idea what happened to the program or data. maybe it's worth getting something similar kicked off again ?

pokerstars have some algorithms for flagging non realistic mouse movements as a bot detection measure

Author:  mlatinjo [ Sat Feb 04, 2017 3:00 pm ]
Post subject:  Re: Mouse simulation with Arduino/Teensy

Hi my idea for mouse recordings is as follows:

1) Make an app which shows gui in the full screen divided into grid. There should be more cells in the areas where buttons are (fold, raise etc) because bot mostly moves mouse between buttons.
2) During mouse recording, app should position a mouse at a grid cell, and highlight another cell where human should move the mouse. When human reaches that cell, I would store the mouse path (mouse locations + timestamp for each location) in the file (json file). For each recorded mouse path, affine transformations could be apply (such as scaling each point, translating each point, rotating each point) and then storing it in file). That way with affine transformation from one path we could generate path almost between any 2 points.
3) When bot is playing, and wants to move mouse between points P and Q, it should look in the file to which grid cell P belongs and to which Q point belongs. And then find a path between those two cells and load it and perform movement. Cells where buttons are I would make max 0.5x0.5 cm size to be very precise in that area and away from buttons maybe 5x5 cm. If bot wants to move mouse betwen P1 = (300,400) and Q1 = (500,600) but we have the closest points in the file P2 = (302, 401) and Q1 =(502, 603) then first I would move a mouse from P1 to P2 using bezier curve (simulated human - like mouse movement) which would be only by few pixels, and then we have exact mouse starting and ending points as in recorded movement and can perform original human movement.

4) Probably it would be enough to store e.g. 1000 different human mouse movements and then if you need to move mouse between points P and Q, you could transform any human path e.g. points Z to X using affine transformations to points P and Q and perform movement. Affine transformations you can find https://en.wikipedia.org/wiki/Affine_transformation
so the main point is that the shape of the human movements still looks the same. I am not still sure about 4) I would need to test it, but I think that it should work.

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