Giter Club home page Giter Club logo

google-hashcode-2018's Introduction

Team - Dynamic Duo

HashCode 2018 Banner

Hash Code is a team programming competition organized by Google for students and industry professionals across Europe, the Middle East and Africa. You pick your team and programming language, we pick a Google engineering problem for you to solve.

Online Qualification Round

Self-driving rides

Introduction

The problem statement can be found here.

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.

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.

Usage of our code

Run our scipt with python hashcode.py

There is one notable parameter for tuning the algorithm:

distance_penalty_multiplier = 3

which is multiply the penalty for each job per car based on the distance between them.

You can change the input and output files name with:

input_file = './input/d_metropolis.in'
output_file = 'd.txt'

Results (Extended Round)

Task Score
A - example 10
B - should be easy 176,877
C - no hurry 15,294,233
D - metropolis 10,399,799
E - high bonus 21,465,945
Total 47,336,864

Authors

Norbert Bajko / @norbertbajko
Peter Nagy / @nagypeterjob

The README.md is based on this one

License

This project is licensed under MIT - see the LICENSE file for details

google-hashcode-2018's People

Contributors

norbertbajko avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.