- Reasons why we put so much emphasis on your Onboarding. - 10. Januar 2023
- Happy Employees - 6. Januar 2023
- Green Coding - 29. Dezember 2022
The first duel between a human and a machine took place as early as the mid-fifties. At that time, Maniac, a computer, played chess against a human for the first time – and won. Nowadays, chess engines have just about reached perfection in playing the game and learning machines show thrilling performances in various other fields.
AlphaZero, for example, is such a chess engine from Google. The field of study behind it, which has become more advanced over time, is reinforcement learning. By now, advanced learning algorithms can outperform human ability by far in various complex problems. In 2019, an internal team at virtual7 took on a project inspired by playing against an AI. During a trade show appearance at Javaland, they came up with the idea of playing the game Looping Louie, featuring an AI. In our german virtual7 Podcast you’ll learn everything about this project: from the initial idea to today’s setup. Looping Louie is a game that is often played at house parties or in children’s rooms and has simple rules. Each player has the task to protect chips from Louie in his bright red airplane.
At first, he turns his rounds very calmly and tries to grab chips in a nosedive. The players have to use their own catapult at the right moment to send Looping Louie back into the air and to make sure they don’t lose their chips. The winner is the player who has the most chips at the end. In the future, we will present our version of this game at fairs – and you can compete against our LouKI7.
The goal is to train the AI called LouKI7 to the point where it can play against humans. In the future a dashboard will be created that will document game scores as well as the latest high scores and can be used at fairs. A proof of concept was created to ensure the feasibility of the project. In this context, continuous measurements of the distance sensor should ensure that the AI can become better.
During the implementation of this project, the team had to face several challenges. In this context, two aspects need to be addressed. Besides the implementation of the software, the team saw a big obstacle in the realization of the hardware of the project. Especially in the area of electrical engineering, success was uncertain, since the electrotechnical know-how in this area was limited. During the learning process up to the current setup, a lot of experimenting had to be done, which did not always run smoothly but in the end resulted in success. Appropriate software solutions, in contrast, could be found quickly. For the implementation, the team agreed on the programming language Python and the Open Source software Apache Kafka.
The term reinforcement learning models play a significant role in the realization process. It stands for a set of machine learning methods in which the agent, in this case, LouKI7, independently learns a strategy through frequent playing. Reinforcement learning models try to mimic learning behavior patterns found in nature by not showing the agent an action upfront ßüpthat is best in certain situations. Instead, it receives positive or negative feedback on the basis of the outcome of its actions.
The programming language Python was chosen for its extensive machine learning capabilities and preexisting expertise in the team. Apache Kafka additionally makes it possible to establish communication between the different components. The physical setup was realized with the help of a Raspberry Pi. This is a small computer that can control processes and serves as an interface to the hardware. Built-in servo motors operate the hammers, which represent players hitting the seesaws with different strengths. Laser barriers installed close to the seesaws in combination with distance sensors record the field in which LouKI7 flies. This allows predictions to be made about the landing point. All other components are realized with a 3D printer. With the help of a webcam, LoukI7’s flight can also be observed remotely.
After the setup was realized, the next actions were already planned. Eventually, the team decided to take the AI chess programs as an example and simulate the entire game virtually. By simulating the setup, the training process is not hindered by the hardware, thereby allowing much faster training times. This gives LouKI7 a better chance of being able to beat players in a duel between human and machine at trade fairs.