/Tubes1_MVP

Tubes 1 IF2211 Strategi Algoritma 2023/2024

Primary LanguagePython


MVP Greedy Bot

An Etimo Diamonds Bot with Greedy Algoritm
Explore the docs » · Report Bug

Table of Contents
  1. About The Project
  2. Getting Started
  3. Project Status
  4. Room for Improvement
  5. Acknowledgments

About The Project

The greedy algorithm used to solve the diamond game seeks the best local solution at each step. In each iteration, the algorithm selects the most advantageous diamond based on certain criteria, such as closest distance or the number of points it offers. Additionally, the algorithm leverages additional features within the game, such as red buttons and teleporters, to gain even greater advantages.

The main algorithm we use is the DirectAttack algorithm that can be found in game/logic/direct_attack.py file

(back to top)

Getting Started

Prerequisites

  • Node.js
  • Python Dependencies
    cd src/tubes1-IF2211-bot-starter-pack-1.0.1
    pip install -r requirement.txt
  • Docker dekstop
  • Yarn
    npm install --global yarn
  • Game Engine

Usage/Examples

  1. Download source code (.zip)
  2. Extract zip and open the file
  3. Go to root directory
cd tubes1-IF2110-bot-starter-pack-1.0.1
  1. Install dependencies using pip
pip install -r requirements.txt
  1. Run bot For 1 bot:
python main.py --logic DirectAttack --email=your_email@example.com --name=your_name --password=your_password --team etimo

For running more than 1 bots:

a. Edit run script in run-bots.bat or run-bots.sh

b. Run script in the terminal

  • Windows
./run-bots.bat
  • Linux / macOS
./run-bots.sh

NOTE : email and name in the script must be different each other and never used before

(back to top)

Project Status

Project status: complete

(back to top)

Room for Improvement

Room for improvement:

  • Improve speed of process
  • Improve code's efficiency

(back to top)

Acknowledgments

(back to top)