ACatastrophicBing / CS-4243-Assignment-2

Genetic Algorithm for Introduction to AI With Joseph Beck
0 stars 0 forks source link

CS-4243-Assignment-2

This code was run and tested using python 3.8

ga.py

Contains code for both problem 1 and 2.

randomgenerator.py

A simple program that populates a text file with 40 random ints for use with puzzle 1. Can be rerun to produce new numbers.

How to Run

To run puzzle 1, in your filepath in terminal, run: python3 ga.py 1 "file.txt" time_in_seconds Example for puzzle 1: python3 ga.py 1 p1_testing.txt 10

To run puzzle 2, in your filepath in terminal, run: python3 ga.py 2 "file.txt" time_in_seconds Example for puzzle 2: python3 ga.py 2 pieces.txt 10

Testing Files

The testing files used were 'p1_testing.txt' and 'pieces.txt'

GitHub Repo

The Github can be found at https://github.com/ACatastrophicBing/CS-4243-Assignment-2