Code Monkey home page Code Monkey logo

google-hashcode-2018's Introduction

google-hashcode-2018

Project developed by:
Martim Silva
Luís Ramos
Francisco Gonçalves

Any problems?
Start an Issue please.

Open Pycharm on the src folder inside this directory and run main.py with the correct arguments You can also run the program through the command line:

python main.py <algorithm>
python main.py <algorithm> <file>

Examples:
python main.py simulated_annealing
python main.py hill_climbing b_should_be_easy

Note that this project was developped in Python3 so make sure you run using that version
You might need to run python3 main.py <algortihm> <file>

algorithms: car_genetic | greedy | hill_climbing | rides_genetic | simulated_annealing
files: a_example | b_should_be_easy | c_no_hurry | d_metropolis | e_high_bonus

google-hashcode-2018's People

Contributors

kiko-g avatar motapinto avatar

Stargazers

 avatar

Watchers

 avatar  avatar

google-hashcode-2018's Issues

unable to run the code

getting this error

ase) PS C:\Users\regin\OneDrive\Desktop\google-hashcode-2018-master> cd src
(base) PS C:\Users\regin\OneDrive\Desktop\google-hashcode-2018-master\src> python3 main.py hill_climbing b_should_be_easy

HILL CLIMBING
Traceback (most recent call last):
File "C:\Users\regin\OneDrive\Desktop\google-hashcode-2018-master\src\main.py", line 77, in
run(hill_climbing)
File "C:\Users\regin\OneDrive\Desktop\google-hashcode-2018-master\src\main.py", line 20, in run
score = algorithm(sys.argv[2])
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\regin\OneDrive\Desktop\google-hashcode-2018-master\src\solvers\hill_climbing.py", line 29, in hill_climbing
dump_rides("../assets/output/" + filename + ".out", solution.cars)
File "C:\Users\regin\OneDrive\Desktop\google-hashcode-2018-master\src\solvers\files.py", line 17, in dump_rides
with open(file, 'w') as f:
^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '../assets/output/b_should_be_easy.out'
(base) PS C:\Users\regin\OneDrive\Desktop\google-hashcode-2018-master\src> python3 main.py greedy b_should_be_easy

GREEDY
Traceback (most recent call last):
File "C:\Users\regin\OneDrive\Desktop\google-hashcode-2018-master\src\main.py", line 86, in
run(greedy)
File "C:\Users\regin\OneDrive\Desktop\google-hashcode-2018-master\src\main.py", line 20, in run
score = algorithm(sys.argv[2])
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\regin\OneDrive\Desktop\google-hashcode-2018-master\src\solvers\greedy.py", line 28, in greedy
dump_rides("../assets/output/" + filename + ".out", cars)
File "C:\Users\regin\OneDrive\Desktop\google-hashcode-2018-master\src\solvers\files.py", line 17, in dump_rides
with open(file, 'w') as f:
^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '../assets/output/b_should_be_easy.out'

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.