{"author_name":"Brendan","cat":"LD #22","comments":[],"epoch":1323911580,"likes":2,"metadata":{"p_key":"62779","p_author":"Brendan","p_authorkey":"7799","p_urlkey":"98552","p_title":"Genetics, Postmen and Curses, Oh My","p_cat":"LD #22","p_event":"LD22","p_time":"1323911580","p_likes":"2","p_comments":"0","p_status":"UPD5","us_key":"7799","us_name":"Brendan","us_username":"rhapso","event_start":"1323993600","event_key":"8","event_name":"LD22"},"text":"<p>So, to get deeper into pygame and now pygcurses I have been doing some playing around with it, not making a game per say, but fun toys none the less.<\/p>\n <p>I made the mistake of hanging out on the IRC (a great place full of fun people!) and iFire trolled me into a challenge of writing a genetic\u00a0algorithm\u00a0to solve the Traveling Sales person problem in half an hour from scratch. Needless to say I failed; it took me 38 minutes to make a working\u00a0algorithm. It was so much fun, it was the first time I had ever\u00a0speed run\u00a0coding\u00a0before.<\/p>\n <p>So, whenever I do an new thing, I have to combine it with my old things, so here is TSP hopefully shortest path map, calculated with a genetic\u00a0algorithm, and rendered in ncurses.<\/p>\n \n <style type='text\/css'>\n #gallery-1 {\n margin: auto;\n }\n #gallery-1 .gallery-item {\n float: left;\n margin-top: 10px;\n text-align: center;\n width: 33%;\n }\n #gallery-1 img {\n border: 2px solid #cfcfcf;\n }\n #gallery-1 .gallery-caption {\n margin-left: 0;\n }\n \/* see gallery_shortcode() in wp-includes\/media.php *\/\n <\/style>\n <div id='gallery-1' class='gallery galleryid-83540 gallery-columns-3 gallery-size-thumbnail'><dl class='gallery-item'>\n <dt class='gallery-icon portrait'>\n <a href='http:\/\/ludumdare.com\/compo\/2011\/12\/14\/genetics-postmen-and-curses-oh-my\/cursestsp2\/'><img width=\"150\" height=\"150\" src=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2011\/12\/cursesTSP2-150x150.png\" class=\"attachment-thumbnail size-thumbnail\" alt=\"cursesTSP2\" \/><\/a>\n <\/dt><\/dl><dl class='gallery-item'>\n <dt class='gallery-icon portrait'>\n <a href='http:\/\/ludumdare.com\/compo\/2011\/12\/14\/genetics-postmen-and-curses-oh-my\/cursestsp\/'><img width=\"150\" height=\"150\" src=\"http:\/\/ludumdare.com\/compo\/wp-content\/uploads\/2011\/12\/cursesTSP-150x150.png\" class=\"attachment-thumbnail size-thumbnail\" alt=\"cursesTSP\" \/><\/a>\n <\/dt><\/dl>\n <br style='clear: both' \/>\n <\/div>\n \n <p>Here is the source:\u00a0<a href=\"http:\/\/pastebin.com\/WjSUB4Cz\">http:\/\/pastebin.com\/WjSUB4Cz<\/a>\u00a0(it is just a script file at this point, sorry)<\/p>\n <p>Thank you Ludum Dare, for a fun time already!<\/p>","time":"December 14th, 2011 8:13 pm","title":"Genetics, Postmen and Curses, Oh My"}