Multi Tiered AI, Incremential Development

Computers generally are very multi-layered devices. We put more abstract, "human" levels on top of more concrete, "mechanical" ones. So it's not surprising that this generally is a successful strategy for solving design problems. AI, for instance, can be done with neural networks which is essentially a "low level, single tiered" solution, or you can build a multi-tiered heuristic. Or incorporate ideas from both.

In Lui, I'm taking a multi tiered approach to AI. Lua as a language is fabulous for this, since it's very abstract and loosely typed. So the lowest level is AI pathfinding. But then I'd like to be able to specify things on a higher level, since as where and when NPCs should wander to. This requires adding some context information to the map, which fortunately meshes very well with the pathfinding. Anyhow the idea is, on one level you have how to walk around from place to place (pathfinding) and on another level you have what places to visit. On another level still, is when to visit these places, and on it goes. Any time you can think of how to build another layer of abstraction on top, it's letting you paint with broader brush strokes which is always want you want as an indie developer.

Incremential development is the idea that you can't create a final product from design, from scratch. You need to always think in terms of what is the next piece, and how does it fit in. This is marvellous for productivity, since if you think this way, not "what huge complex system do I need to build to support this future idea for gameplay" but instead, "what can I build next to solve an existing problem", you tend to build very well prioritized to-do lists. The pathfinding came about as I needed NPCs to walk around. A simple problem, and this solution of giving them different places, and tracking their movement around the entire game world, is actually really cool! And not something that probably would have been developed. But it's incremential.

Right now, I have pathfinding on a given area, and the ability to specify places, which are named collections of tiles that NPCs might want to hang out on. Next will be making NPCs walk between two or more places on the same map. After that, two more places on different maps. After that, the system is actually just about complete (though there are some more issues like doors and whatnot.)


◀ Back