Skip to content

Effcient Ridesharing Dispatch Using Multi-Agent Reinforcement Learning

Notifications You must be signed in to change notification settings

UMich-ML-Group/RL-Ridesharing

Repository files navigation

RL-Ridesharing

Effcient Ridesharing Dispatch Using Reinforcement Learning [Report]

Code for EECS 545: Machine Learning Project

Team Members:
Brian Fogelson*, Hansal Shah*, Oscar De Lima*, Tim Chu*
* Indicates equal contribution

Requirements

  • Python 3.7.x
  • PyTorch 1.4.0

Training and evaluation

Variable number of cars and passengers between episodes

  1. Open agent_variable.py
  2. Set the variables max_cars and max_passengers to your desired maximum number of cars and passengers per episode.
  3. Set the init_cars and init_passengers variables to the number of cars and passengers you want to have in the first episode.
  4. Modify the GridMap object assigned to the grid_map variable by selecting the size of the grid (# of rows, # of columns) and the random seed.
  5. Modify the hidden size variable corresponding to the hidden size of the agent network.
  6. To use a specific model checkpoint, set the load_file variable to the name of the .pth file. Otherwise, set load_file to None.
  7. Set the arguments of the Agent object assigned to the agent variable to choose the learning rate (lr), the size of the hidden layer of the mixing network (mix_hidden), the batch size (batch_size), the epsilon decay (eps_decay), the number of episodes (num_episodes), the mode (mode = "random" or "greedy" or "dqn" or "qmix"), and whether we are training or not (Training = True or False).
  8. Run agent_variable.py
  9. python agent_variable.py

To have a fixed number of cars and passengers between episodes

  1. Open agent.py
  2. Set the variables num_cars and num_passengers to your desired number of cars and passengers for each episode.
  3. Follow instructions 4, 5, 6 and 7 for the scenario with variable cars and passengers shown above.
  4. python agent.py

About

Effcient Ridesharing Dispatch Using Multi-Agent Reinforcement Learning

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages