Author |
Topic: Reading archived games for analysis (Read 1829 times) |
|
phairland
Forum Full Member
Arimaa player #6689
Gender:
Posts: 15
|
|
Reading archived games for analysis
« on: Jan 1st, 2015, 4:54am » |
Quote Modify
|
I downloaded the archived games for analysis. Is a txt file about 65 MB. How do I read the file? Or how do I convert it into a database like sqlite?
|
« Last Edit: Jan 1st, 2015, 5:24am by phairland » |
IP Logged |
|
|
|
Fritzlein
Forum Guru
Arimaa player #706
Gender:
Posts: 5928
|
|
Re: Reading archived games for analysis
« Reply #1 on: Jan 1st, 2015, 11:06am » |
Quote Modify
|
The games archive text is delimited by tabs between fields and newlines between records. Most database programs have a feature that assists in importing text files, if you specify the delimiters.
|
|
IP Logged |
|
|
|
phairland
Forum Full Member
Arimaa player #6689
Gender:
Posts: 15
|
|
Re: Reading archived games for analysis
« Reply #2 on: Jan 1st, 2015, 3:46pm » |
Quote Modify
|
Thank you Fritzlein. If anyone is interested in how to created the full sqlite database worth 4GB of arimaa archive games from 2002 until 2014, I made this batch of sqlite3 commands: http://pastebin.com/XCPEBnfY
|
« Last Edit: Jan 4th, 2015, 4:21am by phairland » |
IP Logged |
|
|
|
Agt
Forum Newbie
Arimaa player #855
Gender:
Posts: 2
|
|
Re: Reading archived games for analysis
« Reply #3 on: Jan 2nd, 2015, 9:29am » |
Quote Modify
|
Hello, You may also be interested in https://github.com/agt-the-walker/arimaa-utils, more specifically fetch-new-games, which will only download game archives that have changed in order to minimize network usage.
|
|
IP Logged |
|
|
|
phairland
Forum Full Member
Arimaa player #6689
Gender:
Posts: 15
|
|
Re: Reading archived games for analysis
« Reply #4 on: Jan 2nd, 2015, 2:03pm » |
Quote Modify
|
Hi Agt, thank you for posting your project. My plan is to fetch a particular game with relavant data and format it into a latex => pdf file. The idea I have is to put the movelist into two columns, one for gold, one for silver and one line per plycount, so it will be much easier to read. I made a nice homemade game board made of cardboard for analysing games so I need an easier way of reading the movelist. I will do the parsing in Tcl, I don't know much about Ruby but I heard is really good for text processing as well. This is the link to my homemade board: http://goo.gl/n7D99B (blu-tak used to attach pieces to board, planning to make another board with a steel sheet and magnetic pieces)
|
« Last Edit: Jan 7th, 2015, 12:11am by phairland » |
IP Logged |
|
|
|
aaaa
Forum Guru
Arimaa player #958
Posts: 768
|
|
Re: Reading archived games for analysis
« Reply #5 on: Jan 4th, 2015, 3:08am » |
Quote Modify
|
65 MB? The total database is more than an order of magnitude larger than that!
|
|
IP Logged |
|
|
|
phairland
Forum Full Member
Arimaa player #6689
Gender:
Posts: 15
|
|
Re: Reading archived games for analysis
« Reply #6 on: Jan 4th, 2015, 4:21am » |
Quote Modify
|
Hi aaaa, Initially I only downloaded allgames201412.txt which is worth 65MB thinking that that was the whole database until that time. Later I realised that is was only the games for that month and that I needed to download the whole bunch of txt files which is worth about 4GB.
|
|
IP Logged |
|
|
|
Agt
Forum Newbie
Arimaa player #855
Gender:
Posts: 2
|
|
Re: Reading archived games for analysis
« Reply #7 on: Jan 4th, 2015, 4:38pm » |
Quote Modify
|
Nice homemade board! Since I'm also a LaTeX user, I can't wait to see the results of your project. I prefer Ruby for text processing but Tcl should also be fine...
|
|
IP Logged |
|
|
|
phairland
Forum Full Member
Arimaa player #6689
Gender:
Posts: 15
|
|
Re: Reading archived games for analysis
« Reply #8 on: Jan 7th, 2015, 12:25am » |
Quote Modify
|
I just started to format the movelist and here is a peek at the pdf, latex and tcl file: PDF http://goo.gl/sFS2fe TEX http://pastebin.com/xTziauDT TCL http://pastebin.com/TqusAMYw I have an account on github, so I will probably upload it there at some point for easy sharing. The Tcl script is a mess of regular expressions but I comment each part, I checked about Ruby regex commands and surely Ruby would be more elegant and clear in that respect, I may try to convert it to Ruby to see how it looks like and how much differ from the Tcl script.
|
« Last Edit: Jan 7th, 2015, 1:00am by phairland » |
IP Logged |
|
|
|
Fritzlein
Forum Guru
Arimaa player #706
Gender:
Posts: 5928
|
|
Re: Reading archived games for analysis
« Reply #9 on: Jan 7th, 2015, 9:11am » |
Quote Modify
|
Thanks; it's nice to see another tool added to the Arimaa community toolkit.
|
|
IP Logged |
|
|
|
|