Veloxcore blog | Always Discovering |Always Sharing

Always Discovering. Always Sharing.

19 Apr 16

Artificial Intelligence: Improve gameplay everytime with self learning AI

Stephen Hawking warns artificial intelligence could end mankind. He said that efforts to create thinking machines pose a threat to our very existence. But till the time, lets play game and kill AI.


Artificial Intelligence: Improve gameplay everytime with self learning AI

Stephen Hawking warns artificial intelligence could end mankind. He is one of Britain's pre-eminent scientists and has said that efforts to create thinking machines pose a threat to our very existence. But till the time it happens, lets play games and kill AI.

Going in the same direction, while casually talking to my friend Vishal Shukla about general purpose AI, a thought came up.

Why Artificial Intelligence of game can’t be trained, based on real players’ interaction with game.

Traditionally developers would program their game and behavior of the element/characters. Which gets boring after you figure-out the pattern in which AI play against player. And I’m not saying they're not good AI games. But take an example of Rise of Nations, where you know that in Moderate level difficulty, AI(non-learning AI) is going to attack you in 8th min for sure and there after will upgrade to next level and another attack is coming at around 12th min. Sounds boring. Right, although it is very good AI from my perspective.

Another problem with game’s AI is that, if user set it to very difficult level it becomes ridiculously fast and impossible to beat. Again we take example of Rise of Nations, if you play the game you need to move through your establishment and upgrade them to be competitive, now AI knows when to upgrade, which building is pending upgrade and by crunching numbers (at which computers are very good at) it builds a perfect clan. Which by the way of looking from eyes of a gamer is not human behaviour and after getting defeated by such AI we leave the game.

On the flip side, if the same AI is designed to be trained then we get a very real player like feeling and a different game play every single time.

The reason more and more gamers are engaging in MMO (massive multiplayer online games) is because it’s unpredictable game play, which excites as well as engage me the most in a game. Almost every time it is different type of players competing against/with you. But there is opportunity as well. Think about newly launched multiplayer game with few initial users liking it very much, but the problem is that there are not many gamers around to compete with. So what now.

Developers can use machine learning and artificial intelligence, train a model using just data from other players. Let model learn moves players make, their strategy, their favorite weapon, everything they do in game. And I’m suggesting this because machine learning require ample amount of data to train well, and games generate good quantity of it, with great amount of depth (data points). This newly trained AI can be presented in game to fill the initial missing spot for multiplayer games, so that you don’t lose your early users. Now you’d argue why take so much pain in training model and all, and why not use traditional hard coded AI. Because no matter how good we program AI, it is always better to mimic broader user's game play rather than what is there in developer's mind.

Google is teaching AI to play Atari games Talking about Google, at DeepMind, a Google subsidiary based in Cambridge, England, built a software based on artificial intelligence, to play classic Atari games. And mind that they did not provided any input, just gave a target, let's say achieve highest score. Then they let it play game by itself, evaluating each step, making mistake and correcting it. Eventually it learned to play it like expert, not even that, it even figured out loopholes in it. You can see this in video below.

So the question is not about whether AI can be trained to play games or not, but how a developer can do it. As a mobile game developer, you can create games but don’t have enough resources or time to build a full fledge AI and train it. But actual business model would be, company like us develop an SDK, which can be hooked in games to allow AI to simulate movements and actions. After it is upto AI framework to take control, learn it and play it back. This way any game can take advantage of integrating a great AI behaviour in their game. I’m starting to imaging which games I’d like to change, many of them.

But don’t forget about Tay.ai, microsoft’s teenage girl twitter bot. It only took less than a day in turning, very innocent, human loving bot to hitler following, racist, rude bot. That means you have to know which players to choose to train AI with, maybe you should hire gamers to train rather than going to everyone or at least choose wisely just like what microsoft is doing now, they only allow invitation based followers to Tay.ai.

Another example of machine learning went wrong is Google’s flu prediction algorithm based on the search query it sees. It predicted quite accurate result the first time it came out in public. But then it didn’t. And no Google’s engineer did not screw it up but all people did. What happened then was, when people knew about it, they started searching about it and this corrupted data on which machine learning is being trained. And soon after that predictions went in wrong direction. Learning here is, you should make sure the data you fed into your machine learning algorithm is as much important as (may be more) the algorithm itself.

What is in for players. Games will become more engaging with different game play each time or at least more human like AI counterpart playing against or with them.Imagine a racing game, where AI makes the same mistake as real players make, they also smash into wall on turns and hit other cars to get ahead of them. A shooting multiplayer game’s AI know what are the best place to hide and do sniping, which weapon will do best damage in near combat or when opponent is far away. I’m very excited about the idea and 2016 is going to be year of machine learning, we are not far away from seeing some crazy ideas like this.

Do you want us to help you with building next Artificial Intelligence or machine learning project. Drop me an email at vinit@veloxcore.com and I'll be happy to help you. Got suggestion or have feedback, use comment section.

Like reading it, Share it.

;