[{"data":1,"prerenderedAt":300},["ShallowReactive",2],{"project-8886897":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":10,"maker":11,"posted_at":12,"year":13,"points":14,"comments":15,"rank_in_year":16,"shown_in_year":17,"top":18,"tier":19,"category":20,"subcategory":21,"format":22,"keywords":23,"reception":29,"sentiment":30,"stance_mix":31,"scored_comments":36,"aspects":37,"strip":43,"post_text":45,"what":46,"said":66,"maker_in_thread":170,"shape":178,"grid":182,"attempts":262,"same_week":263,"maker_shows":39,"maker_hidden":292,"reader_version":293,"card":294},"8886897","C4","Connect Four, with AI","title","Show HN: C4 – Connect Four, with AI","http:\u002F\u002Fkenrick95.github.io\u002Fc4\u002Fdemo\u002F","kenrick95.github.io","kenrick95",1421250202,2015,48,34,590,2565,24,"shown","games","board games","web_app",[24,25,26,27,28],"connect four","game ai","minimax","javascript game","board game","curious",0.078,{"positive":32,"neutral":33,"mixed":34,"critical":35},5,10,0,4,19,{"idea":38,"performance":41,"execution":42},{"positive":39,"critical":40},2,1,{"positive":34,"critical":39},{"positive":34,"critical":40},[34,44,34,32,32,34,44,44,44,40,34,40,34,32,34,34,44,32,34,44,34,34,32,44,34,34,34,44,40,34,44,34,44,40],3,null,{"problem":45,"audience":45,"pricing":45,"motivation":47,"time_to_build":54,"stack":58,"openness":63,"stage":64,"team_size":65},{"value":48,"source":49,"evidence":50},"Apply learning from an AI MOOC and a JavaScript bootcamp to a game","maker",[51],{"id":52,"by":11,"text":53},"8887268","How I build this project: It was mid-2013 when I wanted to apply what I've learned from the MOOC CS188.1x Artificial Intelligence offered at edx.org. Around December 2013, I…",{"value":55,"source":49,"evidence":56},"About one month, started and finished January 2014",[57],{"id":52,"by":11,"text":53},[59],{"value":60,"source":49,"evidence":61},"JavaScript",[62],{"id":52,"by":11,"text":53},"open_source","launched","solo",{"praise":67,"objections":88,"requests":127,"questions":139,"alternatives":150},[68,80],{"value":69,"source":70,"evidence":71},"Good side project and useful for deliberate practice","commenter",[72,76],{"id":73,"by":74,"text":75},"8887710","atrilla","Awesome! It's wonderful to see these kind of side projects for deliberate practice. I also expect to build some of these at http:\u002F\u002Fai-maker.com\u002F Thanks for sharing it and…",{"id":77,"by":78,"text":79},"8889823","smilliken","We did a friendly programming competition at MixRank last year writing AIs for Connect Four. It's really a great game for playing with AI strategies since it's so simple. You can…",{"value":81,"source":70,"evidence":82},"Fun to play and a great test of AI strategies",[83,87],{"id":84,"by":85,"text":86},"8887849","lwgdhn","Every once in a while a new game pops up on HN and I always pay the price in time. Not complaining!",{"id":77,"by":78,"text":79},[89,103,113],{"value":90,"source":70,"evidence":91},"AI is not perfect and can be beaten",[92,96,100],{"id":93,"by":94,"text":95},"8887848","guidopallemans","Just beat yours at 5 moves ahead",{"id":97,"by":98,"text":99},"8887321","JamyDev","Nice, I just beat it :)",{"id":101,"by":11,"text":102},"8887326","I admit that the AI is not perfect. :)",{"value":104,"source":70,"evidence":105},"AI failed to block a three-in-a-row threat",[106,110],{"id":107,"by":108,"text":109},"8887637","vapter","Nice work! I was actually planning to do a similar project in the near future. However, it troubles me that I was able to win when your AI didn't \"block\" me when I put 3 aligned…",{"id":111,"by":11,"text":112},"8890209","Normally it tries its best to avoid that situation, but sometimes your scenario happens and I did not know why.",{"value":114,"source":70,"evidence":115},"A method of always winning as first player exposed a flaw",[116,120,124],{"id":117,"by":118,"text":119},"8887641","alacritythief","I want to note that you can win every time by dropping wherever first, then on your next moves dropping every piece on top of the AI's pieces.",{"id":121,"by":122,"text":123},"8887707","inglesp","Unless I've totally misunderstood, I don't think you're right. For instance, on your first go, drop in column 0. Then, the AI drops in columns 1, 2, 3, 4, leading to this: ``` .…",{"id":125,"by":118,"text":126},"8890819","It could have been fixed after my post, I won 8 times in a row and it seemed to be some kind of fluke. After trying it now, the AI actually tries harder to beat you, and my…",[128],{"value":129,"source":70,"evidence":130},"Make the AI stronger, such as playing perfectly",[131,135],{"id":132,"by":133,"text":134},"8889048","RMarcus","I've been playing at 8 for a challenge. Can't win yet, but I can draw. I left it at 5 as the default because it works well on tablets. :)",{"id":136,"by":137,"text":138},"8887470","unstabilo","No need to apologize, even if it's perfect, the first player can always win by playing the right moves.",[140],{"value":141,"source":70,"evidence":142},"Does the Berkeley AI MOOC recommended by the maker be worth taking",[143,147],{"id":144,"by":145,"text":146},"8887528","mrborgen","Nice job, do you recommend the Artificial Intelligence MOOC? Is it fun?",{"id":148,"by":11,"text":149},"8890179","It's amazing. Although quite time-consuming, the projects are nice: it was building an AI for Pac-man to maximize its score in various scenarios. The next offering is starting…",[151,157,164],{"value":152,"source":70,"evidence":153},"Victor Allis's solved-strategy Connect Four work",[154],{"id":155,"by":78,"text":156},"8889874","Also, if you'd like some light reading, Victor Allis proved a winning strategy in 1988: http:\u002F\u002Fwww.informatik.uni-trier.de\u002F~fernau\u002FDSL0607\u002FMasterthesis-Viergewinnt.pdf. It's a…",{"value":158,"source":70,"evidence":159},"Fhourstones solver and perfect-play applet by Tromp",[160],{"id":161,"by":162,"text":163},"8887417","tromp","My Fhourstones solver and a perfect playing applet may be found at http:\u002F\u002Ftromp.github.io\u002Fc4\u002Fc4.html",{"value":165,"source":70,"evidence":166},"RyanMarcus connect4 project",[167],{"id":168,"by":133,"text":169},"8887549","I wrote a C version of a connect 4 AI and used emscripten to build a JavaScript \u002F AngularJS version. You can check it out for comparison:…",{"comments":171,"answered":44,"key":172},7,[173,174,175],{"id":52,"text":53},{"id":148,"text":149},{"id":176,"text":177},"8890175","I'm aware of the fact that this is a solved problem. When I experimented by making it my AI vs my AI, it did not use the optimal first move. This shows that my AI is not perfect :)",{"commenters":179,"max_depth":35,"maker_replies":171,"first_comment_mins":180,"lifespan_hours":181},25,51,13,[183,185,186,188,190,192,193,195,196,198,202,203,205,206,210,214,217,221,223,227,231,234,236,240,242,243,244,246,250,251,252,253,255,258],[52,34,34,184,11,40],"maker\u002Fneutral\u002Fnone",[144,34,44,184,145,34],[148,34,34,187,11,40],"other\u002Fneutral\u002Fnone",[73,34,32,189,74,34],"maker\u002Fpositive\u002Fidea",[77,40,32,191,78,34],"project\u002Fpositive\u002Fidea",[155,40,34,187,78,34],[168,39,44,194,133,34],"project\u002Fneutral\u002Fnone",[93,39,44,194,94,34],[132,39,44,197,133,34],"project\u002Fneutral\u002Fperformance",[199,44,40,200,201,34],"8889831","project\u002Fcritical\u002Fidea","cl42",[176,44,34,197,11,40],[107,35,40,204,108,34],"project\u002Fcritical\u002Fperformance",[111,35,34,197,11,40],[207,32,32,208,209,34],"8888099","maker\u002Fpositive\u002Fnone","austinhutch",[211,32,34,212,213,34],"8888179","commenter\u002Fneutral\u002Fnone","dirkk0",[215,32,34,212,216,34],"8888311","philbarr",[218,219,44,194,220,34],"8888163",6,"mlamat",[84,171,32,222,85,34],"project\u002Fpositive\u002Fnone",[224,225,34,187,226,34],"8887916",8,"hitchhiker999",[228,229,44,194,230,34],"8887638",9,"bluehazed",[232,33,34,187,233,34],"8887632","kenrick",[235,33,34,184,11,40],"8890217",[237,238,32,208,239,34],"8889881",11,"noso",[97,241,44,194,98,34],12,[101,241,34,197,11,40],[161,241,34,187,162,34],[136,241,34,245,137,34],"commenter\u002Fneutral\u002Fidea",[247,241,44,248,249,34],"8887524","project\u002Fneutral\u002Fidea","stefs",[117,181,40,204,118,34],[121,181,34,212,122,34],[125,181,44,197,118,34],[254,181,34,184,11,40],"8890933",[256,181,44,194,257,34],"8887979","ljk",[259,181,40,260,261,34],"8888876","project\u002Fcritical\u002Fexecution","wuliwong",[],[264,269,274,279,284,288],{"id":265,"name":266,"points":267,"category":268},"8888089","blessed-contrib",305,"dev_tools",{"id":270,"name":271,"points":272,"category":273},"8869305","LoveActualize",252,"consumer_social",{"id":275,"name":276,"points":277,"category":278},"8857632","sideprojects.assembly.com",175,"web_saas",{"id":280,"name":281,"points":282,"category":283},"8886842","c-smart-pointers",126,"languages",{"id":285,"name":286,"points":287,"category":20},"8882197","Powder",107,{"id":289,"name":290,"points":291,"category":278},"8886588","Youth Service Network (ysnmn.org)",100,false,"v2",{"id":295,"name":5,"line":6,"ai":292,"cat":20,"year":13,"points":14,"comments":15,"rec":29,"s":296,"top":18,"kw":297,"maker":11,"domain":10,"tier":19,"attempts":34,"strip":298,"url":9,"mix":299,"praise":69,"objection":90,"sub":21},8886897,0.08,[24,25,26,27,28],"0305503331010500350300530003103031",[32,33,34,35],1793990918436]