Skip to content

Commit

Permalink
Updated INIT_HEAD with option to reset DB
Browse files Browse the repository at this point in the history
Updated README with file descriptions.

build scripts are now executable.
  • Loading branch information
Nicholas Harding committed Mar 31, 2014
1 parent 6a7ebda commit 3a0a820
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
17 changes: 13 additions & 4 deletions INIT_HEAD.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,17 @@ export HOSTPATH=/glusterfs/users/nharding/

git clone https://github.com/hardingnj/chess $HOSTPATH

while getopts ":d" opt; do
case $opt in
a)
mkdir $HOSTPATH/chessDB
rm $HOSTPATH/chessDB/chessAnalysis.db
sqlite3 $HOSTPATH/chessDB/chessAnalysis.db < $HOSTPATH/chess/schema.sql
echo "DELETE was triggered!" >&2
;;
\?)
echo "Invalid option: -$OPTARG" >&2
;;
esac
done
# IF SPECIFIED THEN DELETE AND REGEN DB FILE
#mkdir $HOSTPATH/chessDB
#rm $HOSTPATH/chessDB/chessAnalysis.db
#curl -O https://raw.githubusercontent.com/hardingnj/chess/master/schema.sql
#sqlite3 $HOSTPATH/chessDB/chessAnalysis.db < schema.sql
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ chess
=====

# Introduction
This is a personal project with the aim of using a strong chess engine to empirically evaluate moves in a large number of chess games (potentially over 2 million). The 3 main purposes of this are: 1. Identify objectively the strongest players in history. 2. Establish a baseline of performance expectation to identify cheating in chess. 3. Use information about the type of move to identify general weaknesses in human play, i.e. backward moves are harder to find, or knight moves harder to find.
This is a personal project with the aim of using a strong chess engine to empirically evaluate moves in a large number of chess games (potentially over 2 million). The 3 main purposes of this are:
1. Identify objectively the strongest players in history.
2. Establish a baseline of performance expectation to identify cheating in chess.
3. Use information about the type of move to identify general weaknesses in human play, i.e. are backward moves are harder to find, or knight moves harder to find.
4. Publish a database as an R package so that others may gain insight from this data.

# About the code
The code is designed to be as platform independent as possible and makes substantive use of Docker- the open source container engine. In fact this code is as much an excuse to explore the functionality of Docker as it is to address the problem outlined above. Docker is particulalry useful in this instance as it is necessary to run the code on separate machines/VMs to enable this to be in any way feasible. The code is broken into 2 component parts- a parse script that converts PGN data into a database form. An evaluation script that evaluates games found in the database and records the results. Each of these components exists in a separate docker container.
Expand Down
Empty file modified parsePGN/build.sh
100644 → 100755
Empty file.
Empty file modified scorePGN/build.sh
100644 → 100755
Empty file.

0 comments on commit 3a0a820

Please sign in to comment.