Artificial intelligence and machine learning
The goal of artificial intelligence is to develop systems that exhibit a behavior that appears intelligent to the observer. The machines manage to show cognitive skills such as learning, interaction with the environment and solving problems of various kinds.
A branch of this broad field of study, called machine learning, tries to teach computers how to learn without being specifically programmed for certain objectives: like Pavlov’s dog who understands when it is lunchtime thanks to the repeated sound of the bell associated with the presentation of a succulent bowl of croquettes, the machine interacts with the environment and learn what behaviors they are generate certain results, more or less in line with the objectives given to you. In short, the algorithm learns from the data and manages to understand what the consequences of a given action will be and responds accordingly: a behavior that we would certainly define intelligent.
After these definitions we start talking about games, and especially chess. Alan Turing, mathematical genius and protagonist of Enigma’s decryption during the Second World War, has played a central role in the design of machines capable of performing algorithms in a flexible way, based on input data and intermediate calculation results.
Turing ran so fast it went beyond time: he was responsible for the invention of an algorithm to make a computer play chess … before the birth of the computer! This idea of Turing remained on paper for a long time but, as we shall see, he finally managed to see the light and beat a champion of the chess world (perhaps the greatest player of all time!). The game seems very serious, even for the most authoritative mathematicians. Let’s go in order and jump back, far back – precisely into 1769…
Artificial intelligence as a player
We are in the splendid Schonbrunn Castle, and among the comforts of the nobility there are many to delight in the game of chess. A new challenger arrives, with a particularity: is a mannequin dressed in oriental clothes (and for this nicknamed “the Turk” by the observers of the time), seated at a maple desk. The Turk is very strong in chess, practically unbeatable. The automaton unleashes the curiosity of half of Europe and even Napoleon challenges it, losing loudly twice! Of course there is a trick: a skilled dwarf maneuvers the machinery, remaining well hidden between the gears. And mocking Napoleon himself.
In short, the Turk was not a thinking machine, but the idea of its creator has definitely anticipated the times. Two hundred and more years later we went to the intelligent dwarf hidden under the desk to a machine that plays following the rules given to italways in the sign of the noble art of chess.
Deep Blue, designed by IBM, was the first computer to win a game against a reigning world champion, in 1996: Garry Kasparov does not hold a grudge, and indeed he has dedicated himself to an important popular activity in the field of artificial intelligence (he is of the 2012 his conference dedicated to Turing and the extraordinary idea of the chess algorithm!), Defining his defeat as a great victory for humanity.
Kasparov has learned a lot from his matches against Deep Blue, but the latter did not learn anything from his matches against Kasparov. Today, the increasingly sophisticated machine learning techniques and the computational power of the new GPUs make it possible for real computer learning, and if chess was once used, today algorithms learn to play our favorite video games as real. professionals.
In February 2015, a revolutionary article was published in the authoritative magazine Nature, Human-level control through deep reinforcement learning, which reported the results of an algorithm so flexible as to succeed get exceptional scores on some classic video games for Atari 2600 (including Breakout, Pong and Space Invaders), without being programmed on the basis of the rules of the various games.
The algorithm learned with just the inputs of pixels and scores obtained and continues to improve: in early 2020 he knew how to play better than an experienced human all 57 video games for Atari 2600, which in the meantime have become one of the most significant benchmarks for measuring the machine’s level of machine learning. DeepMind scientists, creators of the algorithm, did not really know the techniques to win, and they learned by observing their creature in action!
As we have seen, today man learns from his comparison with the machine, and the machine, in turn, also improves thanks to the support of its programmers: the challenge is to create increasingly autonomous algorithms and less and less driven.
In this short video, OpenAI – founded, among others, by Elon Musk – shows how it is possible a continuous improvement by the artificial intelligence engaged in a game of the oldest game in the world: hide and seek! Playing millions of times the algorithm is gradually refined and develops really interesting strategies, also based on cooperation. Look to believe: we challenge you not to be fascinated by it.
Artificial intelligence as a creator
Sure, it’s interesting to see a machine become an excellent Pong player from scratch, but what would happen if we also used machine learning to get more and more immersive and realistic videogame experiences, perhaps easing the work of the developers? In 2019 the young independent developer Nick Walton distributed a text adventure based on a model created by OpenAI. AI Dungeon is capable of generating an infinite number of stories, based on our inputs and giving rise to complex and convincing answers: the player can insert any type of text in the dedicated space and find out where the artificial intelligence will take him, in a step two between man and machine that really has the incredible .
Often we happen to face enemies whose action patterns are absolutely legible: Ornstein and Smough Dark Souls, for example, are no longer a challenge, when we understand what their attacks are and we have learned to react accordingly. Machine learning can help build ever-finer artificial intelligence without specific programming. In Metal Gear Solid 5: The Phantom Pain the repeated use of headshots by the player pushes the opposing soldiers to wear more resistant helmets.
It’s about adaptive behavior only in appearance, as, in reality, it is explicitly scripted in the game code by the developers: thanks to the machine learning techniques, the intelligences of the enemies could give birth to this idea by themselves, and maybe cooperate to chase and kill our Snake by studying its patterns behavior and his fighting and exploration habits. In addition, NPCs may develop increasingly multifaceted reactions to our actions.
Increasingly advanced procedural generation techniques could lead to considerable simplifications in the construction of virtual worlds. Not to mention the accuracy that bug checking made by a good algorithm can achieve, trained not to win, but to find small and big problems just like a truffle dog: this could avoid the (very funny!) Absurdities that can be reached, to example, in the series The Elder Scrolls, where it often happens to run into some unexpected. Not only that: a non-human beta tester could “think” about original solutions to achieve a specific goal set by the developers, and provide them with new ideas to implement within the virtual world.
We could train the machine to make accurate predictions about the future success of a video game in development, thus providing (hopefully) reliable answers to investors: if you do not believe that this is possible, know that the European project Virtuous, in collaboration with the Polytechnic of Turin and the Dalle Molle Institute for Artificial Intelligence in Lugano, is developing an artificial intelligence capable of predict the flavor of oils and wines. As we have seen, machine learning also makes us human beings learn. Dancing tango with algorithms is good, and how!
Artificial intelligence could be a double-edged sword for developers. Granting excessive freedom to our clever algorithms will lead them to do everything to achieve the goal we have given them, with sometimes unwanted consequences: the theoretical example of an intelligence programmed to maximize the production of staples is famous. who, as the most efficient method to achieve his goal, thinks of conquering the world and extinguishing mankind to accumulate resources!
In a video game it could lead to unpredictable behaviors that could ruin the experience and be inconsistent with the initial idea of the developers, except in cases where the goal is precisely the unpredictability of the video game itself (as in AI Dungeon). The intelligent algorithm could implement immoral strategies (shielding themselves with innocent civilians, for example) or behaving in a totally absurd way for the human observer.
Just as happened with atomic energy, machine learning techniques can too present risks to humansif used for distorted purposes: an efficient algorithm created to “animate” convincing soldiers in a video game set in a war zone could be implemented in real conflicts, or, as we said, the AI could choose to pursue its legitimate goal taking a path absolutely harmful to humanity. For this you always need a special attention from the developers: artificial intelligence does not have its own moral code, and it is up to the creator to correct and direct it both in the means and in the ends.
The launch of the new generation of consoles is imminent, and technological progress is allowing artificial intelligence to take giant steps, capable of helping man in the most varied fields: from medicine to techno-finance, from games to video games, human ingenuity. creates machines that are increasingly “awake” and capable of learning on their own. We want a next-gen that leads to advancements not only in the graphics and aesthetics of the game, but above all in the realism and immersiveness of the experience: to do this it will be essential to know and make the most of the potential of machine learning. What hopes do you have for the future of artificial intelligence in video games? We are waiting for you to talk about it together in the comments!