How to export number of pieces (and in which square they were) of the final position of a game?

Sort:
SimonOrellana17

Hi everyone,

I want to make some statistical analyses using the final position of several games. For this purpose, I need to know what pieces were left in the final position and in which square they were.

Due to the huge ammount of games, I need an automatic process or something similar.

Does anyone have an idea on how to do this?

All sugestions are welcome.

 

Martin_Stahl
SimonOrellana17 wrote:

Hi everyone,

I want to make some statistical analyses using the final position of several games. For this purpose, I need to know what pieces were left in the final position and in which square they were.

Due to the huge ammount of games, I need an automatic process or something similar.

Does anyone have an idea on how to do this?

All sugestions are welcome.

 

 

You might be able to use the Developer API to pull that down easily.

https://www.chess.com/developers

 

When you click the share option on a game one of the Options is the FEN, which is exactly where each piece is on the board so you could create a process to parse the FEN to gather that data.

SimonOrellana17
Martin_Stahl escribió:
SimonOrellana17 wrote:

Hi everyone,

I want to make some statistical analyses using the final position of several games. For this purpose, I need to know what pieces were left in the final position and in which square they were.

Due to the huge ammount of games, I need an automatic process or something similar.

Does anyone have an idea on how to do this?

All sugestions are welcome.

 

 

You might be able to use the Developer API to pull that down easily.

https://www.chess.com/developers

 

When you click the share option on a game one of the Options is the FEN, which is exactly where each piece is on the board so you could create a process to parse the FEN to gather that data.

Hi Martin, thanks fot the help. 

I was browsing in the developer community that you mentioned, and they showed to me the "Complete Monthly Archives" API that yields the FEN code of the last position. The problem is that it only works with registred users on chess.com, not with famous players. And I want to analize arround 1000 Bobby Fischer games. That is why I need some kind of automatic process.

By the way, I have this Bobby Fischer database on ChessBase software (I mention this in case it makes things easier)

 

 

Martin_Stahl

I'm not familiar enough with most programs to know if they have features to do that.

 

Here is an older topic where someone was trying to do something similar.

 

https://www.chess.com/forum/view/general/pgn-to-fen

Martin_Stahl

The newest version of one of the utilities supposedly can just dump the final position to FEN: https://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/help.html

EscherehcsE

Norm Pollock has a utility that can get you close. It's in his "40H-EPD Tools" package. It's a batch script named "pgnFin.cmd". It lists the final position of each "pgn" game in "epd" format. Uses "pgn-Extract" and "epdFin". (You have to supply a copy of pgn-Extract.) And, as I said in that older thread, the epd positions don't include the halfmove clock field or the fullmove number field, and it adds a comment at the end of the epd position.

Norm Pollock's site: http://www.nk-qy.info/40h/