Giter Site home page Giter Site logo

ashishpapanai / chessjs Goto Github PK

View Code? Open in Web Editor NEW
24.0 0.0 14.0 4.45 MB

This engine has defeated Stockfish Level-6 which has 2300+ ELO rating with 1sec as thinking time. It is an implementation of Chess Engine in JavaScript by using Min Max Tree with Alpha-Beta pruning (GOFAI (Good Old-Fashioned Artificial Intelligence)). The front-end of the website is basic HTML and CSS. ChessJS Version 2 : v2.chessjs.tech

Home Page: https://www.chessjs.tech

License: Other

JavaScript 44.08% HTML 43.99% CSS 11.93%
gofai javascript ai chess chess-engine alpha-beta-pruning algorithm chess-js tree css

chessjs's Introduction

chessjs's People

Contributors

aayushibansal2001 avatar abhijay007 avatar allcontributors[bot] avatar ashishpapanai avatar crmsnbleyd avatar drishti307 avatar fatmab2809 avatar gupta-piyush19 avatar pandeymangg avatar somesh526 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chessjs's Issues

Improve GUI

The current GUI of Engine is very minimalistic and simple, Contributors to this issue are supposed to follow the following task list, Contributions other than the mentioned tasks are always welcome. Details about the codebase are mentioned in the Daily Progress Report document, Any extra details can be mentioned in the comments of this issue.

  • Header with the Name of Engine and a tab to About Us section of the website

  • Footer Comprising details about copyright and Terms and Conditions as mentioned in the license.

  • Colourful and Creative background to enhance the UI of the website.

  • Change the font used on the website.

  • Improved about us page with subtle background and font.

Remove outline from the buttons and add hover effects instead

Is your feature request related to a problem? Please describe.

when the user clicks on the button then the button gets cover with an outline which looks not that great. we can add a hover effect to the button instead which improves UI and it also improves user experience

Describe the solution you'd like

A clear and concise description of what you want to happen.

CSS changes required

Additional context
screenshots:

2021-01-14 (2)

Adding Drag and Drop features to the pieces

JQuery offers certain tools to get the source i.e. the position from where the user started to drag to the position where the user has left the object.
ChessJS expects the participant to get the start and the end co-ordinates of the drag and drop so that the maintainers can work on implementing this feature.

People prefer dragging and dropping the pieces from the source to the destination of the piece to clicking the piece and the destination square.

Creating a single template for the GUI

Reason for proposed feature

  1. Currently, each page added has to be formatted separately, the complete HTML file has to be made from scratch.
  2. GUI on different pages aren't uniform

Proposed Solution/Feature
A single template for all the HTML pages should be created, to ensure uniformity and avoid redundancy.
Jinja Template Inheritance can be used for this feature, with a simple backend in Flask (for rendering the template).
Any approved Frontend/Interface features common to the whole application can be added to the template.

Create a Modal when game ends

Currently, we use browser alerts to tell the player if Game's Over by checkmate, or the game is drawn because of 3 fold repetition or 50 moves rule etc.

We want to switch to Modal based alerts in order to give a personalised alert to the user matching the theme of the website, We have already created a template model in js/model.js this can be used as a reference and new models for Victory, Loss or Draw can be created in a similar fashion.

Flip board button isn't flipping pieces

When a user clicks on the flip board function, the pieces aren't getting flipped, The clicks are rotated by 90 degrees.

The button intents to flip the board for the user so that he can rotate the board by 90 degrees and can change the side AI is playing to experience what AI could do in the situation of the human player.

Possible Fix:
A fix to this issue could be to reset the board and reprint the pieces according to the location before resetting the pieces.

To Reproduce
Steps to reproduce the behaviour:

  1. Go here or Clone the repository and run it on the live server or open index.html file
  2. Click on the Flip Board button on the website.
  3. See an error on moving the pieces.

Expected behaviour
The button intents to flip the board for the user so that he can rotate the board by 90 degrees.

Screenshots
After clicking the square on selecting the e2 square, the d2 square gets selected.
chess

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome
  • Version 87.0.4280.88

Additional context
A fix to this issue could be to reset the board and reprint the pieces according to the location before resetting the pieces.

Improving the About Us Section of the website.

Link to the about us page. About Us
The about us page is having a clean and subtle design but doesn't look connected to the Main vibe of the project. Contributors to this issue are expected to make it much more lively and related to chess and the main idea of the page.
The expected changes are:

  • Making the theme uniform and like the Home page of the website.
  • Improving the font and adding a background image / color as per the theme of the website.
  • Adding rules of chess to the about us page by using this pdf Rules a new page can be created as per the needs of the length of rules.
  • Adding the menu of the home page to the about page as well.

Add move sounds

Add move sounds that would play automatically after any piece is moved.

  • Sound for moves after the move is made by either side.

  • Different sounds for casting, piece capture, checks and checkmate

Pawn promotion choices to the user in the UI

Currently, the pawn is by default promoted to the Queen. This enhancement expects the contributor to give the user a choice in the UI to choose the piece he wants his pawn to be promoted to.

The backend will be prepared for this accordingly by the contributor or the maintainers.

Implementing Additional colour themes to the board

Allow the player to change the colour of the board from 3 colour themes?

  • Green (#254117)+ White (#FFFFFF)
  • Coffee (#6F4E37) + Blanched Almond (##FFEBCD)
  • Grey (#3D3C3A)+ White (FFFFFF)

Additional colour themes are welcome.

Display tips on hovering over Buttons

Users might not be familiar with chess-based terms, and the reasons for the buttons present in the website.

Tips(what happens on clicking the buttons) should be displayed while hovering over them to make their actions clear.

Readme updation

The readme does not look so nice so can be improved by adding gifs and making orientation of things proper

Add docker Support

Is your feature request related to a problem? Please describe.
Not related to a problem but an enhancement

Describe the solution you'd like
Adding a docker support will help contributors to test easily and deployment to cloud will become more simpler

Describe alternatives you've considered
Adding Dockerfile for docker support

Additional context
This would enable easy deployment and orchestration to cloud

Adding timer for creating time controlled variants in the game.

With the evolution of chess different variants have come up and are recognised by FIDE. ChessJS is expected to add these time control with the help of contributors.

Needed time controls:

  • Classical: No time control or 30 minutes with 20-second increment after each move for either side.
  • Rapid: 15 mins with 10 seconds increment after each move for either side.
  • Blitz: 5 mins with 10 seconds increment after each move for either side.
  • Bullet: 2 mins with 10 seconds increment after each move for either side.

The game will end after the timer of any side runs out and the side with time left on the clock will be declared as the winner.

The timer needs to be displayed to both the user at the top right corner of the board for black and bottom right for the white pieces.

Improve the responsiveness of the Website for users running it on non-standard devices

Currently, we are displaying a message that we prefer the user to use either a laptop or a pc with a certain resolution for best experience but that ruins the whole purpose of web and internet.

We don't have a sure shot solution to this problem, Any participant with Good command over JQuery and responsiveness can take up this issue and come up with a solution or any resolutions/ follow up so that we can take up the suggestion and start working on it.

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.