Menu Close

Self Learning AI and our journey to build one

Why Machine learning and what got us into it?

Since 2010, the world has experienced a revolutionary boom in the field of artificial intelligence, primarily driven by advancements in neural networks. These intricate structures, inspired by the human brain’s architecture, have elevated machine learning and data processing to previously unimaginable heights, opening new doors of possibilities across various domains. 

One pivotal event that underscored the power and potential of this technology was the 2016 AlphaGo versus Lee Sedol match. AlphaGo, a machine learning system developed by Google’s DeepMind, shockingly defeated Lee Sedol, one of the world’s top Go players. This marked a groundbreaking moment in the history of artificial intelligence, given that Go was considered a game too complex for computers to master due to its incredible depth of strategy. Inspired and intrigued by these developments.

 

 

We were drawn into exploring the machine learning arena and embarked on a quest to understand the mechanics and potential applications of this fascinating technology that has reshaped the landscape of computational problem-solving.

Questions we wanted to answer:

  • Is this the first step towards general intelligence without human inputs?
  • Pondering questions like, “Will AI take over from humans?”
  • Are there limitations, or can this transcend to the real world and solve hard problems like fusion and curing cancer?

 

 What lies under the hood of Machine learning ?

Under the hood is a neural network. A neural network is a computing system inspired by the human brain’s network of neurons. It consists of layers of interconnected nodes or “neurons” that work collectively to analyze and process data. 

This network learns from examples through a process called training, where it adjusts its internal parameters to better predict outcomes based on the input data. Once trained, it can make predictions on new, unseen data, making it useful for tasks like image recognition, natural language processing, and more.

What is a self trained Machine Learning and why is this special?

When Deepmind created AlphaGo which beat Lee Sedol, they went back to the original design and improved it by creating a new Go playing system called AlphaZero. This did not need any human input, all it needed was the rules of the game. While it initially exhibited a basic level of gameplay, it progressively improved. By continuously playing and learning from its own games, AlphaZero cultivated an intuitive understanding of the game, becoming more advanced and efficient over time.

 

This method of building Machine learning systems without needing any Human input was a fascinating development where Machines learn from first principles and create their own understanding without the need for Human interaction.

What path did we take to build our own Self-trained AI ?

To develop a self-trained AI, we had to be mindful of our computational resources, limiting ourselves to a high-performing CPU paired with a robust Graphics Card (GPU). Considering these limitations, we chose to train our AI on the game Connect4. 

  • The game, played on a 7-column by 6-row grid, offers over 4.5 trillion possible positions, making it an intriguing challenge for our AI system. 

  • We successfully trained the model using a 3080 GPU.

  • Despite its relatively simple rules, Connect4 features complex strategic play, making it an ideal environment for our AI to learn and exhibit creative gameplay.

How did the self trained AI fare?

 

We initially developed our AI software to run on a Nvidia RTX 3080 Graphics Card. Once set up, the AI was provided with a virtual Connect4 board and the game rules. Then, it created two clones of itself to play against each other, learning from its experiences and gradually enhancing its gameplay over time.

 

 

 

Outcomes:

  • The first three generations of the AI were fairly basic, with gameplay skills similar to a competent 10-year-old.
  • By the sixth generation, the AI exhibited a stronger understanding of the game and demonstrated superior gameplay.
  • When tested against various online Connect4 AIs, our AI managed to defeat the majority, with only a select few proving challenging.
  • With further training it beat all the human players it was played against and could only be defeated by a handful of AI systems. ( These systems had similar architecture as itself but trained for a much longer time using larger computation resource )

What were the components of the software?

The training system was written from scratch in Golang. The code is open source and can be found here:

The Machine learning backend uses TensorFlow and was written in python. This is the component which runs on the Nvidia 3080 GPU.

 

https://github.com/t3chn1ca/connect4-self-play