Skip to content

Latest commit

Β 

History

History
166 lines (139 loc) Β· 4.74 KB

README.md

File metadata and controls

166 lines (139 loc) Β· 4.74 KB

Tugas Kecil 1 Strategi Algoritma 2022/2023

πŸ‘Ύ 24-Game-Solver in C++ πŸ‘Ύ


Table of Contents

  1. General Info
  2. Creator Info
  3. Features
  4. Technologies Used
  5. Setup
  6. Usage
  7. Screenshots
  8. Structure
  9. Project Status
  10. Room for Improvement
  11. Acknowledgements
  12. Contact

General Information

A simple program to solve the 24 game problem. The program will take 4 numbers as input and will output all possible solutions for 24 game problem. Program will also output the number of solutions and the execution time. This project is based on the brute force algorithm and write in C++ (Command Line Interface). This project got the best score among informatics engineering students at ITB in 2023.

Creator Information

Nama NIM E-Mail
Mohammad Rifqi Farhansyah 13521166 [email protected]

Features

  • Output all possible solutions to the 24 game problem
  • Output the number of solutions
  • Show the execution time
  • Many different input format (CLI, File, and Random)
  • Colorful output (classificate by the bracket type)
  • Save the output to a txt file

Technologies Used

  • MingGw-W64 version 8.1.0

Note: The version of the libraries above is the version that we used in this project. You can use the latest version of the libraries.

Setup

  1. Download the MingW-W64 from here.
  2. Install the MingW-W64.

Usage

  1. Open the terminal in the project directory.
  2. cd bin and then main.exe to run the program.
  3. Choose the input format.
  4. If you choose the CLI input format, you can input the 4 numbers. If you choose the File input format, you can input the file name (that have been placed in ../test/input). If you choose the Random input format, the program will generate the 4 random numbers.
  5. The program will output the all possible solutions to the 24 game problem, the number of solutions, and the execution time.
  6. If you want to save the output to a txt file, you can choose the y option. If you choose this option, you can input the file name (that will be placed in ../test/output).

Screenshots

Figure 1. Main Menu

Figure 2. Input File Interface (via File Input)

Figure 3. Solution Output Interface (via CLI Input)

Figure 4. Saving output file

Figure 5. Output txt file (via Random Input)

Structure

β”‚   README.md
β”‚
β”œβ”€β”€β”€.vscode
β”‚       settings.json
β”‚
β”œβ”€β”€β”€bin
β”‚       main.exe
β”‚
β”œβ”€β”€β”€doc
β”‚       Tucil1_K2_13521166_MohammadRifqiFarhansyah.pdf
β”‚
β”œβ”€β”€β”€image
β”‚       1.png
β”‚       2.png
β”‚       3.png
β”‚       4.png
β”‚       5.png
β”‚
β”œβ”€β”€β”€src
β”‚       main.cpp
β”‚
└───test
    β”œβ”€β”€β”€input
    β”‚       TestInputFile1.txt
    β”‚       TestInputFile2.txt
    β”‚       TestInputFile3.txt
    β”‚       TestInputFile4.txt
    β”‚       TestInputFile5.txt
    β”‚
    └───output
            TestOutputCLI1.txt
            TestOutputCLI2.txt
            TestOutputCLI3.txt
            TestOutputCLI4.txt
            TestOutputCLI5.txt
            TestOutputFile1.txt
            TestOutputFile2.txt
            TestOutputFile3.txt
            TestOutputFile4.txt
            TestOutputFile5.txt
            TestOutputRandom1.txt
            TestOutputRandom2.txt
            TestOutputRandom3.txt
            TestOutputRandom4.txt
            TestOutputRandom5.txt

Project is: complete

Room for Improvement:

  • Optimalization of the 24-Game-Solver Algorithm code
  • Adding more features
  • Create the better UI for this project

Contact

Contact Me : [email protected]
2023