Skip to content

Latest commit

 

History

History
 
 

Online Qualification Round

Google # Hash Code 2018 Online Qualification Round

Solutions and code for the Google # Hash Code 2018 Challenge "Self-driving rides".

The problem statement can be found here.

The input files can be found in input/

  • example
    Map: (3, 4) Vehicles: 2 Rides: 3 Bonus: 2 Steps: 10
  • should be easy
    Map: (800, 1000) Vehicles: 100 Rides: 300 Bonus: 25 Steps: 25000
  • no hurry
    Map: (3000, 2000) Vehicles: 81 Rides: 10000 Bonus: 1 Steps: 200000
  • metropolis
    Map: (10000, 10000) Vehicles: 400 Rides: 10000 Bonus: 2 Steps: 50000
  • high bonus
    Map: (1500, 2000) Vehicles: 350 Rides: 10000 Bonus: 1000 Steps: 150000

Introduction

Millions of people commute by car every day; for example, to school or to their workplace.

Self-driving vehicles are an exciting development for transportation. They aim to make traveling by car safer and more available while also saving commuters time.

In this competition problem, we’ll be looking at how a fleet of self-driving vehicles can efficiently get commuters to their destinations in a simulated city.

from Problem statement for the Online Qualification Round of Hash Code 2018

Task

Given a list of pre-booked rides in a city and a fleet of self-driving vehicles, assign the rides to vehicles, so that riders get to their destinations on time.

For every ride that finishes on time (or early), you will earn points proportional to the distance of that ride; plus an additional bonus if the ride also started precisely on time.

from Problem statement for the Online Qualification Round of Hash Code 2018

Algorithm

Scores

Overall 45,616,108 points.

Example

10 points, processed in 00:01 min.

Example Output Visualization

Should Be Easy

176,877 points, processed in 00:16 min.

Example Output Visualization

No Hurry

15,790,161 points, processed in 03:57 min.

Example Output Visualization

Metropolis

8,183,115 points, processed in 41:34 min

Example Output Visualization

High Bonus

21,465,945 points, processed in 15:05 min

Example Output Visualization

Visualization

We saved the visualization from the # Hash Code Judge System and added a responsive layout.

Solutions can now be visualized by dropping their corresponding JSON file via drag & drop.

Example Output Visualization

Authors

Sebastian Brodehl / @sbrodehl
Tobias Kremer / @tbkr
Dennis Meyer / @snakebite1457
Moritz Schmidtgen / @mschmi10