The money machine dream

in #story8 years ago

Once upon a time I heard this story about a guy that built a backgammon bot…Xavier is a coder but hadn't had much luck of finding a job he liked. Years passed and he worked on some projects but nothing satisfying.
What is satisfying one may ask? Something that is intriguing to the curious mind of a coder and ex-hacker -in his teenage years. Something that can have a dream on the side; be it small or big, no matter. Something that can produce a lot of money.

Something that is cool enough.

The beginning

One day Xavier was browsing the net trying to find new poker sites. You see, he is also a part-time poker player trying to make a living in a turbulent time for the economy of his country. While browsing the sites, he stumbles upon a site that offers backgammon games for real money.

What? People play a perfect information game for real money online?

Perfect information games like backgammon and chess are very different from imperfect information games such as poker because there is always a best move.That means that computer software can outplay humans, although it may take a Deep Blue to beat the best human. Given that backgammon is easier than chess, there must be some software to play like a champ!

His greedy mind starts to get really hot. “I will make an interface between the site and the backgammon software”. Such a simple thought.

“Why hasn't anyone done it before?” is a question he doesn't like a lot.

In his mind, people that are weak and don’t think highly of their abilities ask this question as an excuse of not taking a risk. He is not such a person (and is also without any options at the moment).

Xavier recruits a good friend of his to help him. He needs to map all the pixels to their positions and get their color codes so that the screen scrapper can detect where all the pawns are. It is a painful procedure; they need to play countless games in order to map all possible combinations of pawns in every slot on the board.

After some time, the real coding begins.

The mid-game

The inner workings

The bot’s principles are simple but the implementation isn't.The bot (interface) needs to get the position of the pawns, recreate this position on the board of the other software (which doesn't have an API unfortunately) and get the optimal move. It takes some time for the software to come up for the optimal move so the bot must be lightening fast. Once it reads the move (using OCR) it needs to actually play it on the board.

The players

Who are those playing backgammon for money? Professionals? Recreational players? A mix of both more probably. Where there is fish there are sharks, nature is so wise. Put only sharks and they will flee. They don’t like each other’s company, they are selfish hungry predators. Obviously, his bot has sharp teeth. It can outplay world champions due to the neural network software it uses to calculate the best move. But is it worth it to play versus other (less dangerous) sharks? No. You need to devour all the innocent fish faster than the other sharks — only because you cannot kill them. This way you get more money because your winning chances are a lot bigger.

“Is it moral to get money this way?” Is a troubling question. There is no time for thoughts like that.

Be a Robin Hood later.

“Who do I want to play against?” is a much more useful question. And it has an answer. The site uses a system like chess’s Elo that ranks players based on the games they have played. These games are weighted so that if you win over a player with a much higher Elo is much more significant than beating a player with a lower one(which you are expected to win anyways).

That is a problem. How is Xavier going to appear like a normal player when he will be winning many (*but not all) of the matches?

An idea comes up. The system doesn't use money in its calculation , mainly because the formula was made up for chess games.

It is easy to lose on purpose games for X dollars and win the game for 20X dollars.Moreover, when you disconnect the result of the match is not calculated. Why not disconnect sometimes when it seems like a sure loss?!

Evil plan…

but that poses another problem. Maybe other sharks come up with that too. He needs to also find a way to know for sure the level of ability of the other player.

The backgammon software he uses can take as input matches and calculate after some time the level of the players. Xavier makes up a database and keeps all the analyzed matches for each player he plays against and also keeps their Elo. This way he is not only sure of the level of this player and if he wants to avoid him,but also if he is also using the same method of deceit (because of the mismatch between his Elo and his analyzed level of ability).

To his surprise, there are other bots out there. He doesn't know if they are others like him or the house’s but the latter seems more probable. They are playing at the highest level, they don’t talk and they are usually there when the traffic is small. They also span a wide range of stakes. Xavier reasons that the operator needs to have bots to accommodate the recreational players that want to play a game at weird hours. Who would like to log on an empty site and wait for action? Certainly not an angry gambler.

Xavier is now working alone, being so preoccupied with his project that he dreams of solutions during the night and implements them during the day. He doesn't eat much and drinks a lot of coffee.

“I must do this. I can do this”

According to his calculations he can make more money than 3 developers working full time in his country, every day, every week, every year.

Without working.

*Backgammon is a game of skill, but a small amount of luck is there too.

Master of deception

One of the most challenging aspects when making this bot is to escape detection. Xavier doesn't know anything about the operator’s level of sophistication and technical expertise. He needs to walk alone in the dark for a while trying to pick up a warning signal and at the same time try to implement all the measures he can think of.

First of all, the bot needs to play a lot but not so much such as to raise eyebrows. A 6–10 hour working regime seems optimal for a pro player. This needs to be a little random and there must be some rest days and also some holidays (are they really going to check a full year’s logs?).

The neural network software is capable of playing at a level called “extraterrestrial”. That means that no human can be so accurate all the time in a given match.Solutions keep on coming.

The bot tries to play much better when its winning chances are bigger and does some pretty basic mistakes when it is about to lose.

The average for all matches is artificially lowered in this way. (Xavier wouldn't share his exact formula).

A human player’s moves are also very different than that of a robot. That means that you can’t click on the same pixel of the button 100% of the time! Or play a move after 5 seconds. Or move the mouse pointer in a perfectly straight line from point A to B. These must all be randomized.

Gaming sites that are serious about security, scan your PC for suspicious processes (how legal is that?) and screen monitoring tools. A way to circumvent this is to have your software scrap a virtual machine’s screen so that the operator’s software cannot detect anything outside of it’s environment.

Moreover,a backgammon player like our bot needs to chat from time to time,otherwise alarm bells go off especially in players that are losing (because they simply cannot accept defeat). At first, he thinks about replying real time. That works for a while but is becoming a bit bothersome. He needs to be in front of the computer and reply instead of doing some actual programming. It’s not so difficult, but it’s not part of the grandiose plan to have a totally independent bot without any human interference. Xavier programs a chat relay server so that when someone talks to him on the chat, he receives this message on another computer or on his cell phone depending on his current location. He can also reply. But maybe there is some artificial intelligence chat service that he can use instead? Yes there is. But it’s a bit silly and the answers it gives are a sometimes random. This is not a good cover up.

“You stupid faggot, you are so lucky. FUUUUU” is one of the countless messages he would see on the morning log (during the night, he left the bot playing but with no responses in the chat).

“Are you a fu**** bot?” is also a common one. This is getting a bit risky.

Then it dawns at him. “How do I know that the opponent is not a bot?” Xavier decides to chat first, usually in an insulting manner, swearing and asking if the other person is a bot when he is losing and swearing a lot if the other person asks him something.

Rude bots are more rare. Strike first.

It’s all automatic of course. He makes up a big list of possible questions and appropriate random answers using sometimes the Google API for getting ideas.

The sin of greed

Xavier’s project is now in full blown motion. He has two PC’s playing backgammon and each of them is running two virtual machines. Each account logs in from a dedicated VPN account that conceives its true location. One account is seen playing from UK, the other one from Finland etc. That means he has four different accounts playing simultaneously (and sometimes each other and also swearing at each other, for maximum cover up!!) The machines are playing non-stop even at night. His main tasks now consist of checking the logs for errors, checking the database for shark players and calibrating the thresholds for analysis, taking a look at chat logs and dreaming.

Dreaming big. The last month was phenomenal, everything was going according to the plan. Money floating to his online money wallet. Not only his, but his mother’s who didn't know anything about her virtual self playing at 4am a high-stakes backgammon game. Xavier is so greedy that he also uses the computers for mining bitcoins at the same time. His lab is so noisy he is not working there anymore but instead uses remote desktop connections.

The end

One morning Xavier wakes up, prepares his usual huge cup of coffee, lights up a cigarette and starts reading his mail. Something sticks out.

“Important security check” is the subject. It is from the site’s security department and it is about a recent withdraw that was a bit bigger than the rest. They want to be sure he is human and they want to talk to him on the phone. A small panicky feeling is suppressed from the nicotine. “Attack first” he thinks. He calls them immediately asking for the security manager in an austere tone. “What is wrong with my account?”

Security: There is no problem Sir, just a few questions. You play quite a lot of backgammon I see — the employee asks in a deceitfully cheerful way. It is almost surely a trap.
Xavier: Yea, I like it a lot. You see I am winning big! You wouldn't quit yourself , would you? — this is a pure bluff.
Security: Haha,yes I can see that. Well OK, that was just a background check can you confirm your data, id numbers and …blah blah.

Xavier was off the hook. This time. Where alarms should have gotten off, he lets himself indulge in the winner’s high.

Big mistake.

The downfall is quick. More telephone calls ensue asking for his mother. Xavier asks a savvy girl friend to impersonate her. She is good but the game is now on and the security guys are not buying it. They have used the same technique as him to analyze his games and seen that he is actually a world class player manipulating the Elo system. Calls to the imaginary friends are not returned, accounts are closed with the money in. For the last account and having known the drill, he decides to play some poker only for fun. He can’t take the money out in any case. But he can have some fun. He logs in a Texas Holdem table and writes in the chat

“Who is not chicken will be rewarded”

The cryptic message makes some of the players wary. Xavier plays a maniacal style for a few hands with everyone folding. One brave soul looks him up and calls his all-in bet for $300 only to see he is bluffing! Some more times of this in other tables and the money is gone. “At least the money went to poker players and not the house!” he thinks.

It’s all over. The outcome is not great. Xavier kept most of the money online in the site and other online wallets and these accounts were closed.

Someone told me that he is now working on a new,legit project.

Sort:  

I have noticed your post was flagged by R4fken, well known steemit hater.

I am for justice and I am here with all my Steem Power to help you resist his hate downvotes and let your post be visible for steem users. Upvoted!

Thanks, I have no idea why someone would downvote a story..

Congratulations @arisalexis! You have received a personal award!

2 Years on Steemit
Click on the badge to view your Board of Honor.

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

Congratulations @arisalexis! You received a personal award!

Happy Birthday! - You are on the Steem blockchain for 3 years!

You can view your badges on your Steem Board and compare to others on the Steem Ranking

Vote for @Steemitboard as a witness to get one more award and increased upvotes!