GithubHelp home page GithubHelp logo

christian-prather / ai-adversarial_search Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 384 KB

A c++ implementation of a connect 4 game playing AI using search for move selection

CMake 25.53% C 14.74% C++ 19.27% Makefile 39.47% Tcl 0.99%

ai-adversarial_search's Introduction

AI-Adversarial_Search

A c++ implementation of a connect 4 game playing AI using search for move selection

Name: Christian Prather CWID: 10711855 Structure: All the code is written in a single max_connect.cpp file with functions to handle the minimax calculation utilizing alpha-beta pruning as well as functions for score calculation and player moves. Some of the code used is from reference file provided however functions such as score calculations were rewritten as the provided example was very incorrect. Run instructions: This is compiled using cmake any version above 3.11 will be sufficent and should not throw errors Linux: 1) Enter the build directory 2) run 'cmake ..' to generate the make files 3) run make -j8 (note j8 specifies using 8 threads only allocate as many as your comuter can handle, if unsure just run make with no flag) 4) An executable called compute_a_posteriori will be generated in the build folder you may now run it with ./maxconnect4 and then add any sequence you want depending on the mode you would like Ex) ./maxconnect4 one-move input1.txt output1.txt 10 (arguments: mode, input file, output file, depth to look) Ex) maxconnect4 interactive input1.txt computer-next 10 (arguments: mode, input file, who plays next, depth to look)

    5) In interactive mode human.txt and computer.txt files will be generated in the build folder after every players turn.
    6) In one-move mode the specified output.txt file passed in as an argument will be generated with the computers move.
Windows:
    I recomend importing the project into clion and compilng that way as the c++ compiler on windows can be tricky

ai-adversarial_search's People

Contributors

christian-prather avatar

Watchers

 avatar

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.