Caution to reader: this blog post is 3 months or older. Blog posts older than three months may contain details about the Hack Reactor program that are no longer accurate. Please refer to other pages on our website to confirm current information and email us with questions.
While it’s easier than ever for lay people to learn the basics of coding through online programs like Codecademy, the bar for artificial intelligence programming is still prohibitively high for most people. That’s what motivated a team of Hack Reactor students, led by Greg Trowbridge, to build JS Battle, an artificial intelligence game that welcomes newbies to the field, but is engaging for experienced AI coders. The project topped the popular news aggregator Hacker News on the first day of its release.
“We wanted to build a game that people could participate in without requiring a huge time investment,” says Trowbridge. “It's easy to sign up for JS Battle, and using our starter code makes you competitive with other users, but there's still plenty of opportunity for users to improve their code. So it's accessible to people new to AI, but also fun and challenging for more experienced users.”
The game simulates a daily battle between two teams, Yellow and Blue, to gain control of a board, and/or capture the most diamond mines. Each player is given a hero with a customizable AI. The AI determines each hero’s decisions on a move by move basis about where to go. The battle between the two sides plays out over the course of the day.
The game was built by Trowbridge, James Yothers, Jake Harclerode, and Forrest Thomas using Node.js for the game engine, Express for the back-end web server, Docker for running hero code, Backbone on the front-end, Mocha, Chai and Supertest for testing, and MongoDB for data storage.
“Our initial goal is to give people a fun, easy way to get involved in writing AI code,” Trowbridge explains. “However, users are free to customize their hero code to pursue ANY strategy they want, so our hope was definitely to help people learn more about AI and pathfinding algorithms in general.”
Trowbridge’s interest in artificial intelligence comes from AI’s incredibly powerful and useful applications. Self-driving cars, image recognition and Watson, the IBM computer that won Jeopardy and is now being applied to the medical field, are some of the better known artificial intelligence projects that companies have undertaken. By giving computers generalized abilities rather than specific tasks, they are able to become exponentially more dynamic and functional.
Want to learn to code as efficiently and powerfully as these guys? Apply to Hack Reactor today!