{"author_name":"Atomic","cat":"LD #25","comments":[],"epoch":1355678940,"likes":2,"metadata":{"p_key":"48246","p_author":"Atomic","p_authorkey":"1556","p_urlkey":"83911","p_title":"AI","p_cat":"LD #25","p_event":"LD25","p_time":"1355678940","p_likes":"2","p_comments":"0","p_status":"UPD5","us_key":"1556","us_name":"Atomic","us_username":"atomic","event_start":"1355443200","event_key":"14","event_name":"LD25"},"text":"<p>Spent a lot of time thinking about the AI. Here&#8217;s what I think is my best shot:<\/p>\n <p>(do this every time a new piece is chosen)<\/p>\n <p>Repeat for each column and rotation possible:<\/p>\n <p>-Apply r rotatiosn and move piece to x column as fast as possible<\/p>\n <p>-Compute the resulting board<\/p>\n <p>-Store the sequence of moves and the amount of points (inversely proportional to average column height and directly proportional to number of lines cleared)<\/p>\n <p>Choose the sequence of moves that gives higher points.<\/p>\n <p>&nbsp;<\/p>\n <p>This will miss all scenarios where the best move involves going to one side and then back below another piece. It will also require one move per y drop or it&#8217;s gonna look very ugly.<\/p>\n <p>Wish I could&#8217;ve come up with something better but I&#8217;m not even sure I&#8217;ll be able to get this working under a 16MHz processor in the few hours I have left.<\/p>","time":"December 16th, 2012 12:29 pm","title":"AI"}