Skip to content

SanteyneEmbeddedSystems/Embedded_Chess

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Embedded_Chess

Provides an implementation of the chess game suitable for embedded system (optimized for a 16 bits microcontroller).

The characteristic of this implementation are :

  • efficient CPU usage
  • low memory consumption :
    • 14026 bytes of ROM
    • 1611 bytes of RAM
  • no dynamic memory allocation

This application implements an AI based on the alpha–beta pruning algorithm.

Rules

The rules implemented by the application are the ones published by FIDE except :

  • A pawn is always promoted as a queen.
  • The number of movements is limited due to memory limitation (tippically 128 movements).
  • Draw is not implemented except stalemate.

Design model

User interface

This diagram gives the interface that a user of this application can use.

User interface model

Debug

To ease debug, a controller and a console viewier are added. The controller can acces the interface Board_Management.

It can be use to play chess on a computer...

The possible commands are :

  • A movement given as the initial postion followed by a final position, knowing that a position is a file (from a to h) and a rank (from 1 to 8).
    Exemples :
    • e2e4
    • a1a8
  • play : to ask the IA to play (by default the depth of the Alpha–beta pruning algorithm is 1 for White and 4 for Black)
  • undo : to undo the last move (either manual or by the IA).
  • quit : to exit from the application.

Console example

Demo

To test the application on an embedded system the Arduino sketch Embedded_Chess.ino is provided.

It interfaces the application using Serial communication.

Arduino demo

About

Provide an implementation of the chess game suitable for embedded system.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published