Week 9 MLNI – Innovative Interface with KNN (Cherry Cai)

Traffic Light Controller

  • Inspiration

I was inspired by an online traffic controlling game. 

(https://www.fanfreegames.com/game/traffic-light-control)

The mechanism of this game is intuitive: users are asked to control the traffic light by clicking their mouse so that the car from different directions won’t bump with each other when passing through the intersection.

  • My project

So my expectation is to create a traffic light controller project implementing the concept of KNN Classification. By recognizing input gestures, the traffic light can be changed accordingly. Understand the KNN classification mechanism is definitely not easy, I did some experiments before creating my own project but still had a hard time manipulating the code. I reached out to my friend Wei and she had helped me a lot.

Input: real-time camera image

Neurons: three pre-loaded snapshots representing the three traffic lights. The snapshots are recorded in an array after pressing three specific keys on the keyboard. 

Interface:  the traffic light drew using p5

I had encountered some problems regarding using the result and triggering the expected effect. As I have three neurons, I was a little bit confused by how to call each of them out. I will solve this problem as soon as and improve the interface as well.

Leave a Reply