Skip to content

altugbakan/altug-car

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AltugCar

This is the code of AltugCar, which has finished in 10th place on 0xMonaco by Paradigm CTF.

Tactics

AltugCar aims to save money until the last bit of the race while disrupting its enemies' economy.

Overview

The algorithm is as follows:

  1. If AltugCar is in the first place, it buys acceleration until the cost of a shell. If the second player does not have enough coins, it inflates the price of a shell.

  2. If AltugCar is in the second place, it tries to catch up with the first player by buying a shell, or buying enough acceleration, whichever is cheaper.

  3. If AltugCar is in the last place, it buys all the acceleration allowed to try catching up.

Usage

  1. Clone or Fork this repository
git clone https://github.com/altugbakan/altug-car
cd huff-heap-sort
  1. Install dependencies
forge install
  1. Build and race the car against the other cars (default: AltugCar vs ExampleCar vs ExampleCar)
forge build
forge test

Acknowledgements