Archive for the ‘Programming’ Category

Uncertainty and Knowledge in AI: Looking back at AI Challenge 2011

Saturday, May 31st, 2014

I’m almost half a decade late, but I recently read xathis’ postmortem for his entry into the Google-sponsored AI Challenge 2011, where contestants pitted their AI ants against other AI ants in a bid to dominate a small, grid-based map with static obstacles (water tiles). He had a very clear approach to the whole thing, and I enjoyed reading the postmortem, but as I watched the replay, I noticed he underutilized his ants, even though he eventually won hands down. Especially for some early skirmishes, he loses ants or halts progress due to stalemates on account of poor tactics (or rather, a failure to prioritize engagements in his strategy) because some ants decide to wait for food spawns around the hill instead of pushing outward or securing a frontline. (more…)

Using GameLoop in Your Own C++ Projects

Wednesday, April 2nd, 2014

About 2 months ago, I released a modified chunk of code from one of my personal projects under the MIT license and put the repository up on Github. The project itself was comparatively much larger than the repo then (orders of magnitude larger if you compare sloc), and is even larger now, but I thought that there was value in releasing an abstracted, bare-bones version of my main program loop, mostly because I often benefit from such efforts myself (often when I’m trying to learn something new) and thought of it as some form of giving back, and partly because I believe that releasing code under flexible licenses helps foster a sense of community among developers.

The project was borne out of a desire to learn a bit more about Control Theory, in particular its applications in multi-agent systems, and having decided (in my infinite wisdom, and largely unemployed state) to brush up on my C++, I wanted to make a simulation so I could test a few core concepts from the multitude of papers I got off Springer and IEEE and whatnot using my girlfriend’s library account. Since it was a simulation, and since it was going to require both some form of artificial intelligence and some amount of user input, I decided to build it like a game from the offset. In many ways the idea was basically a real-time strategy anyway, since the tests I had in mind all had at least some of the elements you’d expect from a strategy game: customizable input schemes, some quantifiable amount of resources on a finite map, deterministic results and playback, agent competition, differences in agent abilities, and so forth. As such, it needed a loop, and needing a loop meant that I had to revisit some old reference material from way back when. (more…)