Skip to content

Chess program with AI having a vintage linux terminal interface.

License

Notifications You must be signed in to change notification settings

kranand6/ASCII-Chess

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 

Repository files navigation

This is a chess program completely written in C Programming Language (C99 standard).It is without GUI, so it can be played on linux terminal.The chess grid is made using Unicode and accepts input in the form :-

             Type in your move{prompt}: 1 b1 c1
The above command moves pawn(1) from it's initial position 'b1' to final position 'c1'.

            The Artificial Intelligence code is written in the file under the name AI.c, which is capable of noticing check conditions and avoiding them too. Game Tree concept has been implemented which gives a lot of room for development as in here the evaluation is being done only for a single future instance i.e. it predicts the human output for the next immediate move only and then from there ,it evaluates the best possible move for itself(computer).So there is enough space to increase the accuracy of the game by evaluating the outcomes for more future instances 
            
            This code is capable of noticing and rejecting "illegal" moves typed-in by a human player, so it goes without saying that with little editing the game can work for human v/s human matches.
            A lot many things are not implemented in this program for example, the code is strictly an "intelligent" code as there is no previous memory or experience, many  algorithms have not been implemented and people may want to write code for GUI interface since it has none.

INTENDED AUDIENCE
  Any person having basic knowledge of C Programming Language and willing to spend a few hours reading and understanding the code.

COMPILATION
Type-in the following command in the directory containing the files chess3.c and AI.h:-
       gcc -std="c99" chess3.c AI.h -o chess
 which will create an executable file under the name chess, open this file and the game will be up and running.
 
FOR WINDOWS USERS
You may download many of the gcc ide's or softwares available for free on the net.Some of the Ide's are given here:

1)Eclipse CDT (you can download bundle from http://eclipse.org)

2)Cygwin (http://www.cygwin.com/)
  gives a linux like environment on windows

3)Code::Blocks IDE (http://www.codeblocks.org/)
  
4)CodeLite opensource cross platform IDE(http://codelite.org/) 
  It works great on almost all Operating Systems: Windows XP/7 and 8, Debian / Ubuntu, Fedora / OpenSUSE, Mac OSX 10.5.8

If you wish to proceed in the direction of software development, using a good shell won't hurt!

Have Fun!!

CREDITS
Sharat Shankar
email Id:sharat.shankar15@gmail.com

Parigyan Chandra Goyal
email Id:panzer.surfer@gmail.com

About

Chess program with AI having a vintage linux terminal interface.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 100.0%