Giter Club home page Giter Club logo

megachessatron's Introduction

PROJECT MEGACHESSATRON

Created by students of CSE NITH 3rd year.

Image of Megachessatron

Project Structure

This is a simple chess engine written in C. The code uses the Minimax algorithm to evaluate the best move in a given position. The state of the game is stored in structs in C.

File structure:

  • common.h -- contains all definitions (game state, functions etc). Included by all files.

  • board.c -- contains code for managing structs having board position, printing board, etc etc

  • moves.c -- contains code for finding possible moves etc

  • evaluate.c -- contains evaluation function which calculates chances of winning/losing

  • main.c -- contains the user interface, input/output etc.

  • bestmove.c -- contains commands to find best move according to minimax algorithm.

  • loops.c -- contains helper functions for bestmove

  • Makefile -- config file for automatic building/compiling.

How to Compile and Run the code

This project is designed to be compiled on linux using gcc. To compile this code, first download the code and extract it or clone it with git (using git clone <url>). Then move to the directory having the code (using cd <path>). Then to compile it type the command make. If gcc is installed on your system and everything works properly, the code should compile and an executable file called MegaChessatron will be created in that folder (check it with ls). To run it, simply type ./MegaChessatron.

On windows you can either try to import the project into DevC++ and set the custom Makefile using instructions given here: https://stackoverflow.com/questions/13544684/running-a-project-in-dev-c or you may use either the git shell or cygwin to get a linux shell in windows.

How to run this program in a GUI (Xboard/Winboard protocol)

You can install Arena Chess Program which is a GUI for various chess engines. Compile the code with "make xboard" and then you will get an executable file "MegaChessatron". Open Arena and go into "load engine" or install engine option and choose the executable file and set protocol to XBoard or Winboard v1. Then use the engine GUI to either play with the program yourself or arrange an engine-vs-engine match.

How to contribute to the code

In order to contribute to the code, you have to first fork this repository on Github. Then clone the repository from your own account (install git and run git clone <url>). Then create a new branch in git, make changes to the code and commit your changes after testing them. Once a new feature has been added or a bug has been removed, merge it with the master branch and send a pull request to the original repository.

megachessatron's People

Contributors

krkartikay avatar cupcakerainbow avatar legendary-acp avatar anshulangaria avatar vaibhav00tyagi avatar shivam-kapila avatar

Stargazers

Eugene Yakhnenko avatar  avatar Sahil Ramola avatar

Watchers

James Cloos avatar  avatar Daniyaal Khan avatar

megachessatron's Issues

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.