Academic Completed

Autonomous Connect Four Robot

Robotics, embedded systems & mechanical design

Team project with Oskar Wernegreen. I contributed to the design and development of the mechanical system, electronics, embedded software, fabrication and integration of the final robot.

Custom-built autonomous Connect Four robot with a motorised carriage and disc dispenser

What it does

An academic robotics project developed for How to Make Almost Anything at the IT University of Copenhagen. The goal was to design and build a machine capable of playing Connect Four against a human by combining mechanical design, electronics and embedded programming.

The robot detects player moves using seven infrared sensors positioned above the board and maintains an internal 6×7 representation of the game. It then chooses a response and physically executes the move using a motorised carriage and custom disc-dispensing mechanism.

The machine was designed and fabricated as part of the project rather than assembled from an existing robot design. The board was laser-cut from MDF, while the carriage, dispenser and other mechanical components were designed in Fusion 360 and manufactured using FDM 3D printing.

Why We built it

We wanted to explore the challenge of building a robot that combines physical control and computation to perform a task normally carried out by a human.

Connect Four provided a good robotics problem because it required sensing, decision-making and precise mechanical movement to work together as one system.


What We built

  • Designed and fabricated mechanical components using Fusion 360, laser cutting and FDM 3D printing
  • Developed a servo-driven rack-and-pinion mechanism for dispensing individual game pieces
  • Built a belt-driven linear carriage controlled by a stepper motor to position the dispenser above each column
  • Integrated seven infrared sensors to detect the human player's moves
  • Programmed the Arduino to maintain the game state, detect wins and draws, and coordinate sensors, motors and user controls
  • Implemented the bot's move-selection algorithm to win, block the opponent and build longer lines
  • Integrated an LCD display and physical controls for game status, reset and starting-player selection
  • Tested and calibrated the complete sensing and movement system

Technical challenges

  • Achieving reliable IR detection because the MDF board initially reflected enough infrared light to interfere with detecting game pieces.
  • Designing a dispensing mechanism that reliably releases exactly one disc while remaining compact enough to move with the carriage.
  • Maintaining accurate carriage positioning so that released discs align with the narrow openings of the seven columns.
  • Integrating mechanical tolerances, sensors and embedded control logic into a system that could reliably play complete games.

Results

  • Built a functional robot capable of playing complete Connect Four games against a human.
  • Successfully integrated mechanical design, electronics and embedded software into a single autonomous system.
  • Achieved reliable player-move detection using seven independently positioned IR sensors.
  • Completed a 100-move integration test of the sensing and positioning system without a recorded failed move.
  • Identified mechanical alignment as the main limitation and proposed improved funnel-shaped column entrances and a more rigid frame as future improvements.

More projects

All projects
  • The church camp website home page shown on a laptop
    Personal Live

    Church Camp Website

    Full stack web application

    A full stack web application where campers sign in and pay their camp fees online, with payments handled through the Nets Easy API.

    • React
    • JavaScript
    • Supabase
    • Playwright
    • Nets Easy API
    View project
  • Visualisation of results produced by the Group Formation Algorithm
    Academic Completed

    Group Formation Algorithm

    Bachelor’s thesis project

    A constraint-based optimisation algorithm that creates fair and balanced teams based on participants’ skills, backgrounds, and grouping requirements, developed for an annual church camp as my bachelor’s thesis.

    • Python
    • Gurobi
    View project
  • The Sukkermap interactive school map interface
    Academic Completed

    Sukkermap

    Map navigation website

    An interactive indoor map that helps students at a Danish gymnasium find their way around the school, built as a co-developer.

    • JavaScript
    • HTML & CSS
    • p5.js
    View project