Robotic arm connecting the dots through AI | IE University

Robotic arm connecting the dots through AI

The Robotics & AI Lab was set up to provide IE University students with the space, guidance and resources to develop the innovative ideas sparked in their related programs.

Through the Lab, three members of the student-led IE Robotics & AI Club conceived a robotic arm that could play the popular game Connect 4. Using algorithms to decide where to drop its next playing chip, it would need to have the intelligence to play competitively and the mechanical accuracy to pick up and place chips correctly once it chooses its move.

Three students, three project elements

Alberto, Pablo and Ahmad wanted their creation to be fun and interactive. Their project, which they named VictorIA, actually required a three-way combination of skills and knowledge. Firstly in computer vision, using a camera to view and interpret the vertical playing area and the chips in place. Secondly, an algorithm that could not only distinguish the chips’ colors, but help the robotic arm figure out the best spot to place them across a range of difficulty settings. And thirdly, robotics—the ability to program the arm to pick up and place each chip accurately once the decision is made.

Robotic arm connecting the dots through AI | IE University

A range of technical solutions

The primary programming language behind both the AI and robotics elements of the project was Python; the team turned to OpenCV for tasks related to helping the computer “see” the board. Minimax was the principal decision-making algorithm used, while a Robot Arm will be used to move the physical pieces. This is the only part of the project that’s still in development.

For the team, one of the biggest challenges they’ve had to overcome is creating algorithms that could distinguish between the playing chips’ colors in different ambient light conditions. It was a fundamental feature—gameplay was practically impossible without it. This task required a lot of trial and error as the camera’s perception of color is affected by factors such as shadows, indirect sunlight, artificial light and so on.

Robotic arm connecting the dots through AI | IE University

Takeaways and future plans

While the physical part of the project is still undergoing development, the team has already taken important learnings away from the progress they’ve made so far. Citing their improved skills in programming, computer vision and algorithm-building, they also point to the invaluable experience they’ve gained in collaboration and teamwork. The team dynamic has worked out perfectly, with each member focusing on their core skills but complementing each other’s work.

Alberto, Pablo and Ahmad hope to complete the development of the arm itself. As part of their theses, they also intend to perfect VictorIA’s algorithm and add the ability to play with chips of any color. And by enhancing its AI element, they plan to make VictorIA learn the game so deeply that it’s unbeatable!

The team’s longer-term ambition is to branch out into other games, teaching VictorIA to play checkers and even chess, which would require perhaps the most complicated algorithm in gaming. We’re proud of what they have already accomplished and can’t wait to challenge VictorIA to a game!

Three people seen from behind, looking out a window, with a caption saying 'I started this project alone'.
Play