Welcome, Guest. Please Login or Register.
Nov 21st, 2024, 6:22pm

Home Home Help Help Search Search Members Members Login Login Register Register
Arimaa Forum « Reading archived games for analysis »


   Arimaa Forum
   Arimaa
   Game Analysis
(Moderator: supersamu)
   Reading archived games for analysis
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Reading archived games for analysis  (Read 1829 times)
phairland
Forum Full Member
***



Arimaa player #6689

   


Gender: male
Posts: 15
Reading archived games for analysis
« on: Jan 1st, 2015, 4:54am »
Quote Quote Modify 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

   
Email

Gender: male
Posts: 5928
Re: Reading archived games for analysis
« Reply #1 on: Jan 1st, 2015, 11:06am »
Quote Quote Modify 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: male
Posts: 15
Re: Reading archived games for analysis
« Reply #2 on: Jan 1st, 2015, 3:46pm »
Quote Quote Modify 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: male
Posts: 2
Re: Reading archived games for analysis
« Reply #3 on: Jan 2nd, 2015, 9:29am »
Quote Quote Modify 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: male
Posts: 15
Re: Reading archived games for analysis
« Reply #4 on: Jan 2nd, 2015, 2:03pm »
Quote Quote Modify 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 Quote Modify 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: male
Posts: 15
Re: Reading archived games for analysis
« Reply #6 on: Jan 4th, 2015, 4:21am »
Quote Quote Modify 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: male
Posts: 2
Re: Reading archived games for analysis
« Reply #7 on: Jan 4th, 2015, 4:38pm »
Quote Quote Modify 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: male
Posts: 15
Re: Reading archived games for analysis
« Reply #8 on: Jan 7th, 2015, 12:25am »
Quote Quote Modify 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

   
Email

Gender: male
Posts: 5928
Re: Reading archived games for analysis
« Reply #9 on: Jan 7th, 2015, 9:11am »
Quote Quote Modify Modify

Thanks; it's nice to see another tool added to the Arimaa community toolkit.
IP Logged

Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.