Giter VIP home page Giter VIP logo

pgnstats's Introduction

pgnstats

parses PGN files and extract statistics from them. handles huge files like a champ!

usage

example: pgnstats -f myFile.pgn -o stats.json

help: pgnstats -h

statistics

  • openings tree
  • heatmaps _ square utilization _ move squares _ checking squares _ capture squares
  • results (white win / black win / draw / na)
  • games ending with check / mate
  • game length histogram
  • material count histogram (using standard values)
  • material difference histogram
  • end game material count histogram (using standard values)
  • end game material difference histogram
  • castling (black/white, same/opposite)
  • min/max ELO
  • min/max year
  • branching factor per ply
  • piece tracking

pgnstats's People

Contributors

ebemunk avatar

Stargazers

 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

pgnstats's Issues

# command-line-arguments

Hello ebemunk
I'm new in Go so I don't understand what have I done wrong
C:\Users\Shams\Desktop\ChessProject\pgnstats>go run pgnstats.go -h
will return next issue what

# command-line-arguments
.\pgnstats.go:38:11: undefined: Read
.\pgnstats.go:40:20: undefined: GameStats
.\pgnstats.go:47:4: undefined: Parse
.\pgnstats.go:61:15: undefined: OpeningMove
.\pgnstats.go:68:4: undefined: GetStats
.\pgnstats.go:86:10: undefined: NewGameStats
.\pgnstats.go:104:21: undefined: PosMap
.\pgnstats.go:121:20: undefined: GameStats

What's the problem or I launch that script wrong?

I could not run the ./pgnstats

I get an error saying -bash: ./pgnstats: No such file or directory. Where is the .sh file to run? Or what file should I run?

Installation issue

I'm having trouble installing this because the following packages can't be found and aren't included in the repo.

github.com/malbrecht/chess
github.com/malbrecht/chess/pgn
github.com/pkg/profile

I'm new to Go so it could also be me doing something stupid. Can you help me with the install? Thanks!

Visualize json output?

Hi!

What tool do you recommend for visualizing the json output?
Just had a quick look at this project. Looks very neat :)

/Jon Even

Heatmap visualization after pgnstats

Hello ebemunk and happy new year. I'm trying to do heatmap visualization and observed that after pgnstats.go script the file on the output has the next view:

Heatmaps":{"SquareUtilization":[{"B":23,"K":25,"N":16,"Q":128,"R":245,"b":39,"k":72,"n":8,"q":48,"r":297}, ...and 63 other squares
but html visualization form requires next form:

heatmaps":{"squareUtilization":[{"p":{"w":11,"b":0},"n":{"w":6,"b":5},"b":{"w":16,"b":41},"r":{"w":124,"b":178},"q":{"w":34,"b":48},"k":{"w":2,"b":13},"all":{"w":193,"b":285}}, ...and also 63 other squares

So there is Bishop->King->Knight->Queen->Rook
But requires also Pawn and 'all'
What is it "all" and is that possible use pgnstats.go script for Heatmaps visualization?

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.