GithubHelp home page GithubHelp logo

clarkerubber / irwin Goto Github PK

View Code? Open in Web Editor NEW
486.0 24.0 41.0 181.88 MB

irwin - the protector of lichess from all chess players villainous

Home Page: https://lichess.org

License: GNU Affero General Public License v3.0

Python 98.85% JavaScript 1.15%
ai tensorflow mongodb machine-learning chess chess-engine lichess lichess-api python numpy

irwin's Introduction

irwin

irwin is the AI that learns cheating patterns, marks cheaters, and assists moderators in assessing potential cheaters.

screenshot of Irwin report

screenshot of companion WebApp

Dependencies

Compatible with Python 3.x

Python Libraries

pip3 install pymongo python-chess numpy requests

Database

Configuring

Create conf/config.json

{
  "api": {
    "url": "https://lichess.org/",
    "token": "token"
  },
  "stockfish": {
    "threads": 4,
    "memory": 2048,
    "nodes": 4500000,
    "update": false
  },
  "db": {
    "host": "localhost",
    "port": 27017,
    "authenticate": false,
    "authentication": {
      "username": "username",
      "password": "password"
    }
  },
  "irwin": {
    "train": {
      "batchSize": 5000,
      "cycles": 80
    }
  }
}

conf/config.json contains config for stockfish, mongodb, tensorflow, lichess (authentication token and URL), etc...

Build a database of analysed players

If you do not already have a database of analysed players, it will be necessary to analyse a few hundred players to train the neural networks on. python3 main.py --no-assess --no-report

About

Irwin (named after Steve Irwin, the Crocodile Hunter) started as the name of the server that the original cheatnet ran on (now deprecated). This is the successor to cheatnet.

Similar to cheatnet, it works on a similar concept of analysing the available PVs of a game to determine the odds of cheating occurring.

This bot makes improvements over cheatnet by taking a dramatically more modular approach to software design. modules/core contains most of the generic datatypes, BSON serialisation handlers and database interface layers. It is also significantly faster due to a simplified approach to using stockfish analysis.

modules/irwin contains the brains of irwin, this is where the tensorflow learning and application takes place.

Irwin has been designed so that modules/irwin can be replaced with other approaches to player assessment.

Env.py contains all of the tools to interact with lichess, irwin, and the database handlers.

main.py covers accessing the lichess API (modules/Api.py) via Env to get player data; pulling records from mongodb, analysing games using stockfish, assessing those games using tensorflow and then posting the final assessments.

irwin's People

Contributors

clarkerubber avatar ddugovic avatar isaacl avatar lakinwecker 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

irwin's Issues

Setting up the engine

We are building a chess app using the Flutter framework and wish to integrate the Irwin AI Engine into our backend server. Can you please advise me on setting up the Irwin Engine locally? Is a there setup document available? Please also advise on how we can generate analytical reports and what are some other features we could execute from the engine? A video link (if any) would be most helpful.
Thank you
Mrugenndra

OTB cheating

In view of the latest cheating allegations, I was looking into testing GM OTB games. I could probably get a database of pgn games for training. Just wondering about lichess API integration - is it possible to run this repo in standalone mode without integrating with lichess?

Is it currently using by lichess website?

Hi and thanks for this great piece of code. you've mentioned

the protector of lichess from all chess players villainous

Is it really in use by this website?and if yes is this code fully functional copy of same thing lichess is using?

Updating

Hi, is anyone working on updating this important app to current library versions - tf 1 reached end of life this month, and Python 3.7 at the end of July. I'd like to do it, but i'm not going to if this is already being done.

Add a license

A license should be added to the repository (one that is compatible with lila's license, I guess).

Suggestion: Cheat detection toggle for casual games

Me and a friend of mine were having a friendly study match which we were analyzing. The match continually got suspended as we had the analysis board open.

Is it possible to get an option for turning off cheat detection or any other solution?

Main.py

Hi! I'm sorry, but where can I get main.py to launch python3 main.py --no-assess --no-report? I'm a novice in Python. And I spent a lot of time to solve this. I do not understand something I guess.

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.