• Notifications
  • Fork

/capstone Private

Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
42 lines (28 sloc) 1.99 KB

CS-495: Capstone Project, Whitman College 2018

Camille Anderson, Richie Farman, Riley Worthington

Project Overview

This project implements a simulation of a two-dimensional landscape with obstacles, containing cat and mouse agents. The agents behave as follows:

Mice

  • Have a goal
  • Use RRT (Rapidly-exploring Random Tree) motion planning algorithm to find path to goal

Cats

  • Attempt to capture mice
  • Use Proportional Navigation to plot course to nearest mouse in their line of sight

Users have the ability to adjust the following parameters:

  • Number and type of agents
  • Starting and goal positions of agents
  • Position and shape of obstacles
  • Size of landscape (rectangle)
  • Number of time steps to run

Installation

The simulation requires the python packages bresenham, numpy, pygame and pandas. These packages are all installable using pip.

Running the simulation

Using the command python3 simulation.py will run a default simulation with two mice and one cat, in a pre-built test room containing two walls. The mice have goal position (0,0), defined as the top left corner of the grid. X coordinates increase to the right and Y coordinates increase down.

Start of simulation

start of simulation

After one time step, mouse planning has occurred

start of simulation

The pink lines display the trees generated by the mice, and the green lines show their selected path to the goal.

Machine Learning in the Simulation

This project contains a machine learning class that is integrated throughout the program. The ML object is designed to easily generalize to most scikit-learn API's. Every time the simulation is run, it adds information to the database used for training. When activated, the ML object will edit the theta value of the cat's trajectory.