Coder Social home page Coder Social logo

gervinfung / simpleparallelchessai Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 1.0 3.85 MB

A Parallel AI Chess Game from Level 1 to Level 10 made with Java Swing

License: GNU General Public License v3.0

Java 100.00%
java alpha-beta-pruning chess ai alphabeta-minimax-search alphabeta-algorithm minimax-alpha-beta-pruning propertychangelistener propertychangesupport multithread multithreaded multithreading game

simpleparallelchessai's Introduction

NOTE: Archived this repo, for latest code, check out the link below

https://github.com/GervinFung/LibGDX-Chess-Game

A simple 2 player chess AI that implemented minimax & alpha-beta pruning & move-ordering & pawn structure analysis to fully optimise the AI with a proper FEN file format

I screwed up my previous chess game with bad design and without planning ahead

I decided to make a chess game because my pc do not have one

NOTE: Credit to Christos-Kouros for timer function

Folder Structure

The workspace contains two folders by default, where:

  • src: the folder to maintain sources
  • res: the folder to maintain resources like the images
  • lib: the folder to maintain external libraries like Guava

To play the Game

NOTE: The image dragged is a bit low quality as image of piece is added to cursor

No. Steps
1. Open Intellij Project.jar program in out/artifacts/Intellij_Project_jar
2. User can choose to play as white/black
3. User can choose white/black as AI
4. Or, user can watch AI play against itself
5. Once the game started, left press the piece you wish to move, drag and drop to the square you wish to place it
6. OR, right click the piece you wish to move, and right click again to the square you wish to place it
7. User can reset the timer if they wish to do so
8. The piece will move as user drag

Game Features

NOTE: if AI move is undo, press its piece so AI can move again

No. Features
1. Restart new game
2. Save game/ Load saved game
3. Exit game
4. Highlight legal moves
5. Show move history
6. Choose AI level from 1 to 5
7. Show captured piece
8. Show AI thinking progress bar
9. Undo previous move
10. Multithread feature depends on the number of cores of a pc, the greater the better/faster AI can think
11. Flip board
12. Enabled/disable a timer (Credit to Christos-Kouros)

Chess sample SimpleParallelChessAI.jar

simpleparallelchessai's People

Contributors

christos-kouros avatar gervinfung avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

christos-kouros

simpleparallelchessai's Issues

Errors in test

Hello, I was looking the code and i saws that in the test folder, there is an error in every calss due to an import you put.

testing

Also, i would like to add a few other issues I saw while I was ruuning the code. First, when playing with the AI after i put it to level 2 and higher it takes forever to make a move (in a particular moment it took about 1.30 min ) and when i put it in level 6 it crushed after some time. (first screenshot)
Secondly , (2nd and 3rd screenshots) , i did the same moves (left and right) , so did the AI and it never ended (i had to manually end the game if i wanted to start a new one) . What i mean is that even though it is in a position that there is no way i (white) can get out , the game lets me do infinate loops of the same moves resulting in being stuck.
I hope this makes sesne
thank you
Στιγμιότυπο οθόνης (1232)
Στιγμιότυπο οθόνης (1237)
Στιγμιότυπο οθόνης (1238)

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.