GithubHelp home page GithubHelp logo

frequentlymisseddeadlines / chuck-norris-chess Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 1.69 MB

♜A kicking chess game with minmax and alphabeta pruning but not written by Chuck Norris. Queen's gambit enabled.

Java 100.00%
chess chess-engine bitboard arena-chess chuck-norris minmax alphabeta-pruning

chuck-norris-chess's Introduction

Build GitHub release (latest by date including pre-releases) Github All Releases MIT License

Description

I'm not Chuck Norris. He didn't code this AI. But it will kick you hard! Hence, this kicking name. By default it uses MinMax with AlphaBeta pruning optimization. You can switch to Monte Carlo Tree search or Random with the configuration file.

Try it out

In Arena Chess GUI

This engine supports UCI protocol so it can be plugged in any polite compatible GUI. For Arena Chess (download):

  • If Java 8+ is already installed on your computer go to next step. If not, you can download.
  • Download the last version of the JAR file in Releases page.
  • Open Arena Chess GUI
  • Go to Engines > Install New Engine and select the previous JAR file
  • Select UCI
  • You should now be able to play against Chuck, enjoy being kicked!

In standalone mode

Run jar:

java -jar Chuck-Norris-Chess-1.2.jar

If you terminal supports Unicode you should see something like this (I run it directly from IntelliJ):

To play, type your moves with this notation:

e2e4
e7e5
...

Known issues

If the display is broken and you want to switch to the degraded mode go to next section (configuration) and uncomment this property: #UI.UIConsole.enableUTF8=false

Configuration

Update src/main/resources/application.properties file and pass it at runtime to override default conf:

java -jar Chuck-Norris-Chess-1.2.jar --config.location=src/main/resources/application.properties

Benchmarks

We can run the JAR with benchmark option to run JMH (figures depend on your hardware and Java version):

java -jar Chuck-Norris-Chess-1.2.jar benchmark

Benchmark                      Mode  Cnt   Score   Error  Units
AlphaBetaBenchmark.alphaBeta  thrpt    5  48,335 ± 0,720  ops/s
AlphaBetaBenchmark.negaMax    thrpt    5  45,252 ± 0,642  ops/s

Dependencies

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.