[{"data":1,"prerenderedAt":230},["ShallowReactive",2],{"project-6384713":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":5,"maker":10,"posted_at":11,"year":12,"points":13,"comments":14,"rank_in_year":15,"shown_in_year":16,"top":17,"tier":18,"category":19,"subcategory":20,"format":21,"keywords":22,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":33,"aspects":34,"strip":38,"post_text":41,"what":42,"said":81,"maker_in_thread":148,"shape":157,"grid":161,"attempts":191,"same_week":192,"maker_shows":176,"maker_hidden":223,"reader_version":224,"card":225},"6384713","jsbin.com","pure client-side Connect Four AI with Web Workers, AngularJS, Firebase","title","Show HN: pure client-side Connect Four AI with Web Workers, AngularJS, Firebase","http:\u002F\u002Fjsbin.com\u002FexIjAQO\u002F21","hieu",1379134849,2013,39,13,638,1739,37,"shown","games","board game","web_app",[23,24,25,26,27],"connect four","web workers","javascript ai","angularjs","game ai","debated",0,{"positive":31,"neutral":32,"mixed":31,"critical":31},2,1,7,{"execution":35,"performance":36,"idea":37},{"positive":29,"critical":32},{"positive":31,"critical":32},{"positive":29,"critical":29},[29,32,29,39,29,39,29,39,29,40,29,32,40],3,5,null,{"problem":43,"audience":41,"pricing":41,"motivation":50,"time_to_build":41,"stack":54,"openness":80,"stage":80,"team_size":80},{"value":44,"source":45,"evidence":46},"Demonstrates that JavaScript can handle computationally intensive AI in the browser","maker",[47],{"id":48,"by":10,"text":49},"6384908","My main goal in building this is to demonstrate that at this point (with HTML5 & V8) Javascript is not only good for UI but also for computationally intensive tasks like AI.…",{"value":51,"source":45,"evidence":52},"Demonstrate that JavaScript is good for computationally intensive tasks like AI",[53],{"id":48,"by":10,"text":49},[55,59,64,68,72,76],{"value":56,"source":45,"evidence":57},"JavaScript",[58],{"id":48,"by":10,"text":49},{"value":60,"source":45,"evidence":61},"Web Workers",[62],{"id":63},"post",{"value":65,"source":45,"evidence":66},"AngularJS",[67],{"id":63},{"value":69,"source":45,"evidence":70},"Firebase",[71],{"id":63},{"value":73,"source":45,"evidence":74},"HTML5",[75],{"id":48,"by":10,"text":49},{"value":77,"source":45,"evidence":78},"V8",[79],{"id":48,"by":10,"text":49},"unknown",{"praise":82,"objections":110,"requests":130,"questions":139,"alternatives":147},[83,103],{"value":84,"source":85,"evidence":86},"Impressive, well-executed AI and clean UI","commenter",[87,91,95,99],{"id":88,"by":89,"text":90},"6384808","tedsanders","Wow, great work. Does the AI play perfectly? Edit: Looks like the answer is no, since I drew it while playing second. One option to improve the engine could be to give it an…",{"id":92,"by":93,"text":94},"6385094","oakaz","It's quite strong. Thanks for creating this.",{"id":96,"by":97,"text":98},"6384879","umutgultepe","The AI is impressive, but it mostly fails when you just go for a horizontal four at the lowest row. I won 4 out of 3 games like that. UI is good, gets the job done.",{"id":100,"by":101,"text":102},"6384822","benatkin","This game is not fun to play. The graphics and the UI are solid. And apparently, the AI is also solid. Good work. How about a human vs human version?",{"value":104,"source":85,"evidence":105},"Good example of web workers use",[106],{"id":107,"by":108,"text":109},"6384936","yareally","Seeing this reminds me of a similar project I had to do as an undergrad, though nowhere as fun\u002Felegant as the submitter's. Also nice to see web workers implemented for the AI as…",[111,119,123],{"value":112,"source":85,"evidence":113},"AI is beatable with simple strategies like filling the bottom row horizontally or center-first",[114,115],{"id":96,"by":97,"text":98},{"id":116,"by":117,"text":118},"6390675","crystaln","Filling in the first row from the center out beats the AI every time.... I'm sure the AI is a technical marvel - still needs some work though.",{"value":120,"source":85,"evidence":121},"Game is not fun to play",[122],{"id":100,"by":101,"text":102},{"value":124,"source":85,"evidence":125},"UI bug: placing a token first does not start the game like the OK button",[126],{"id":127,"by":128,"text":129},"6385024","chad_oliver","Awesome work! There's a bug in the UI: placing a token should start the game in the same way as clicking \"OK, go\". Currently, the game itself will work fine but the red arrows at…",[131,135],{"value":132,"source":85,"evidence":133},"Add human vs human mode",[134],{"id":100,"by":101,"text":102},{"value":136,"source":85,"evidence":137},"Add an opening book to the engine",[138],{"id":88,"by":89,"text":90},[140],{"value":141,"source":85,"evidence":142},"Why is the function named pvs?",[143],{"id":144,"by":145,"text":146},"6384782","binofbread","Very cool. Scanning the source code makes it look like you were using Alpha-Beta pruning[0], but I'm not totally sure why the function is named 'pvs'. Does anyone have a quick…",[],{"comments":39,"answered":39,"key":149},[150,153,154],{"id":151,"text":152},"6384792","Thanks! PVS (Principal Variation Search) is an improved version of AlphaBeta. How much improvement depends on the quality of your move ordering algorithm.…",{"id":48,"text":49},{"id":155,"text":156},"6384821","Thanks! No, it doesn't play optimally even though this game has been solved. That's not really fun, either. What it does is to try to think like human and at the same time as…",{"commenters":158,"max_depth":31,"maker_replies":39,"first_comment_mins":159,"lifespan_hours":160},11,38,42,[162,164,166,169,171,175,178,179,181,182,185,187,189],[107,29,29,163,108,29],"other\u002Fneutral\u002Fnone",[127,32,32,165,128,29],"project\u002Fcritical\u002Fexecution",[167,31,29,163,168,29],"6385306","mushishi",[96,39,39,170,97,29],"project\u002Fmixed\u002Fperformance",[172,39,29,173,174,29],"6385745","commenter\u002Fneutral\u002Fnone","filearts",[144,176,39,177,145,29],4,"project\u002Fneutral\u002Fidea",[151,176,29,177,10,32],[100,40,39,180,101,29],"project\u002Fmixed\u002Fidea",[48,40,29,177,10,32],[88,183,40,184,89,29],6,"project\u002Fpositive\u002Fperformance",[155,183,29,186,10,32],"project\u002Fneutral\u002Fperformance",[116,33,32,188,117,29],"project\u002Fcritical\u002Fperformance",[92,190,40,184,93,29],8,[],[193,198,203,208,213,218],{"id":194,"name":195,"points":196,"category":197},"6373645","Wit",321,"ai",{"id":199,"name":200,"points":201,"category":202},"6393048","goworker",179,"infrastructure",{"id":204,"name":205,"points":206,"category":207},"6407794","Signal",151,"productivity",{"id":209,"name":210,"points":211,"category":212},"6375958","bdon.org",96,"learning_science",{"id":214,"name":215,"points":216,"category":217},"6371478","Formbuilder.js",78,"languages",{"id":219,"name":220,"points":221,"category":222},"6390749","Web-controlled Christmas Lights with Node.js, Arduino, and Raspberry Pi",51,"hardware",false,"v2",{"id":226,"name":5,"line":6,"ai":223,"cat":19,"year":12,"points":13,"comments":14,"rec":28,"s":29,"top":17,"kw":227,"maker":10,"domain":5,"tier":18,"attempts":29,"strip":228,"url":9,"mix":229,"praise":84,"objection":112,"sub":20},6384713,[23,24,25,26,27],"0103030305015",[31,32,31,31],1794036509587]