Python replay reader

winmovelist,losemovelist=cget_variables_from_game("name_of_replay_file")

#wvl=win dataset, lvl=lose dataset wvl,lvl=cget_variables_from_game.cget_variables_from_game(game) #for each data set generated by a turn in the winning data list for turndata in wvl: framenum,pos,vel,avel,jointstate,frac,crush,score=turndata

Last edited by gmon; Apr 22, 2010 at 01:58 AM .

I know this is not a lua program. But it is related to helping with writing lua programs. The library is nice if you are reading large sets of replays, like over 10k. (sidenote:if there are lua programmers that can provide a lua example of the library, that would be great)cget_variables_from_game is a relatively fast library for parsing replay files. the library has one function and is used like this:and returns a list of winning moves, losing moves and all the joint information (see example).This program is useful for reading replays and gathering data on best moves, winning replays, etc.There are three files included:cget_variables_from_game.so - shared c++ library for reading replaystoribash_reading_example.py - a python program demonstrating the librarytest_judo_replay.rpl - sample judo replay file