Back to portfolio

Simulation of self-driving agents negotiating speed changes approaching traffic-light-free intersections

1 / 3

The project

Our product is a 2D simulation of autonomous vehicles approaching a traffic-light-free four-way intersection, aiming to coordinate safely without relying on traditional traffic lights. Each vehicle shares information such as its position, speed, direction, priority, and intended path, then participates in a bidding process to negotiate its passing. The system evaluates whether proposed agreements between vehicles are safe by checking possible conflicts, safety distances, and crossing order. If a safe agreement is found, the vehicles adjust their behavior accordingly. If negotiation fails, the system switches to a fallback mechanism to prevent collisions. The impact of the solution is that it provides the client with a platform for studying autonomous intersection management. It helps compare decentralized bidding against the safer fallback baseline to improve traffic flow and efficiency.

The customer

Our client was Richard van Dijk, a researcher at LIACS, Leiden University. When proposing the project, his goal was to explore how autonomous vehicles can coordinate safely and efficiently by sending proposals and agreements to a traffic controller. Communication focused on clarifying the expected behavior, including the negotiation mechanism, safety rules, fallback behavior, and performance criteria. We would meet weekly, and his feedback helped us gradually refine the project scope, eventually turning the project from a basic vehicle simulation into a system with bidding logic, collision prevention, and dashboard metrics.

The team

Our team worked using Scrum. Viktoria acted as Scrum Master, coordinating sprint planning and progress, while Nathanael acted as Product Owner, managing the backlog and reviewing product increments. The rest of the team worked as developers and/or researchers depending on current demands. We divided the work through sprint planning, GitHub issues, and PRs. Each team member focused on specific parts of the system, such as conflict handling, negotiation, testing, or code quality. Collaboration improved throughout development as we clarified acceptance criteria and reviewed each other’s work. We experienced some teamwork challenges halfway through development, but were able to work those out through open discussion and clarifying commitments. We are most proud of delivering a working multi-agent traffic simulation with bidding and fallback systems.

The technologies

Languages:

  • Python: implementation of the simulation, autonomous agents, traffic rules, bidding logic, testing, and command-line interface.

Important frameworks and libraries:

  • Pygame: 2D rendering, simulation window, input handling, and visualization of the crossroad environment.
  • Python multiprocessing: running simulations and graphing/comparison modes in separate processes.
  • NumPy and Matplotlib: graphing and analysis tools for simulation results.

Tooling:

  • pytest and unittest: automated tests for spawning, bidding behaviour, fallback rules, priority rules, and smoke checks.
  • Ruff: Python linting and code quality checks.