{"id":26408,"date":"2024-03-25T03:27:16","date_gmt":"2024-03-25T02:27:16","guid":{"rendered":"https:\/\/www.graviton.at\/letterswaplibrary\/how-to-transform-this-chess-db-on-python\/"},"modified":"2024-03-25T03:27:16","modified_gmt":"2024-03-25T02:27:16","slug":"how-to-transform-this-chess-db-on-python","status":"publish","type":"post","link":"https:\/\/www.graviton.at\/letterswaplibrary\/how-to-transform-this-chess-db-on-python\/","title":{"rendered":"How To Transform This Chess DB On Python?"},"content":{"rendered":"<p><!-- SC_OFF --><\/p>\n<div class=\"md\">\n<p>The database has entries like this, each one of them being a full chess game:<\/p>\n<p>[&#8216;e2e4&#8217;, &#8216;g8f6&#8217;, &#8216;d2d4&#8217;, &#8216;g7g6&#8217;, &#8216;c2c4&#8217;, &#8216;f8g7&#8217;, &#8216;b1c3&#8217;, &#8216;e8g8&#8217;, &#8216;e2e4&#8217;, &#8216;d7d6&#8217;, &#8216;f1e2&#8217;, &#8216;e7e5&#8217;, &#8216;e1g1&#8217;, &#8216;b8c6&#8217;, &#8216;d4d5&#8217;, &#8216;c6e7&#8217;, &#8216;c1g5&#8217;, &#8216;h7h6&#8217;, &#8216;g5f6&#8217;, &#8216;g7f6&#8217;, &#8216;b2b4&#8217;, &#8216;f6g7&#8217;, &#8216;c4c5&#8217;, &#8216;f7f5&#8217;, &#8216;f3d2&#8217;, &#8216;g6g5&#8217;, &#8216;a1c1&#8217;, &#8216;a7a6&#8217;, &#8216;d2c4&#8217;, &#8216;e7g6&#8217;, &#8216;a2a4&#8217;, &#8216;g6f4&#8217;, &#8216;a4a5&#8217;, &#8216;d6c5&#8217;, &#8216;b4c5&#8217;, &#8216;f5e4&#8217;, &#8216;c4e3&#8217;, &#8216;c7c6&#8217;, &#8216;d5d6&#8217;, &#8216;c8e6&#8217;, &#8216;c3e4&#8217;, &#8216;d8a5&#8217;, &#8216;e2g4&#8217;, &#8216;e6d5&#8217;, &#8216;d1c2&#8217;, &#8216;a5b4&#8217;, &#8216;e4g3&#8217;, &#8216;e5e4&#8217;, &#8216;c1b1&#8217;, &#8216;b4d4&#8217;, &#8216;b1b7&#8217;, &#8216;a6a5&#8217;, &#8216;g3f5&#8217;, &#8216;f8f5&#8217;, &#8216;e3f5&#8217;]<\/p>\n<p>e2e4 means the piece on e2 (the pawn) moved to e4. Problem is, I have no way of knowing which piece is moving somewhere. For example, &#8220;g7h8&#8221; means the piece on g7 moved to h8 but unless I run all the previous moves I have no way of knowing which piece is that.<\/p>\n<p>How can I transform this into a more understandable dataset?<\/p>\n<p>I&#8217;m not sure this is the sub to ask this, if it isn&#8217;t I&#8217;d appreciate if you could tell me where to ask it<\/p>\n<p>PD: I&#8217;ve checked the chess library in python but I haven&#8217;t found anything<\/p>\n<\/div>\n<p><!-- SC_ON -->   submitted by   <a href=\"https:\/\/www.reddit.com\/user\/Aston28\"> \/u\/Aston28 <\/a> <br \/> <span><a href=\"https:\/\/www.reddit.com\/r\/datasets\/comments\/1bn23ml\/how_to_transform_this_chess_db_on_python\/\">[link]<\/a><\/span>   <span><a href=\"https:\/\/www.reddit.com\/r\/datasets\/comments\/1bn23ml\/how_to_transform_this_chess_db_on_python\/\">[comments]<\/a><\/span><\/p><div class='watch-action'><div class='watch-position align-right'><div class='action-like'><a class='lbg-style1 like-26408 jlk' href='javascript:void(0)' data-task='like' data-post_id='26408' data-nonce='65e0e39b87' rel='nofollow'><img class='wti-pixel' src='https:\/\/www.graviton.at\/letterswaplibrary\/wp-content\/plugins\/wti-like-post\/images\/pixel.gif' title='Like' \/><span class='lc-26408 lc'>0<\/span><\/a><\/div><\/div> <div class='status-26408 status align-right'><\/div><\/div><div class='wti-clear'><\/div>","protected":false},"excerpt":{"rendered":"<p>The database has entries like this, each one of them being a full chess game: [&#8216;e2e4&#8217;, &#8216;g8f6&#8217;,&#8230;<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[85],"tags":[],"class_list":["post-26408","post","type-post","status-publish","format-standard","hentry","category-datatards","wpcat-85-id"],"_links":{"self":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/posts\/26408","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/comments?post=26408"}],"version-history":[{"count":0,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/posts\/26408\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/media?parent=26408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/categories?post=26408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.graviton.at\/letterswaplibrary\/wp-json\/wp\/v2\/tags?post=26408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}