Python : Traffic AI

Alex Brinkley

Shortly after completing the Pedestrian Simulation in Unity found here, I received another task that required me to design and implement a Traffic Simulation inside of Maya using Python. The focus was on six driver behaviors, in which we had to put into the traffic simulation.

  • Emergency stop
  • Panic
  • Spin out of control and crash
  • Swerve
  • Recover from stop
  • Drive around obstacle

Having had a series of lecturers on Artificial Intelligence within games, the first implementation technique that sprung to mind was using a Finite State Machine which would easily be able to handle the different behaviors we were tasked with creating. Knowing this, I began researching into the world of State Machines to gain a deeper knowledge into the way they work.

Through my research, I came across a series of Python videos by Trevor Payne in which he talks through different aspects of coding in…

View original post 474 more words

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s