Work in progress.

I’ve been working on and off lately on creating a library of classes and algorithms in C# to help me make games and game prototypes. When I get them into a decent state I intend to put them up online, releasing the code to the public domain (free for any use).

Right now I have classes for a generic priority queue, a generic deck of cards (any type of object as cards), and for a graph structure which can have any type of objects stored at its nodes and a different type (or the same) stored at its edges. I’ve got a simple heapsort algorithm (which I used to test my priority queue), and I’ve got a class for the A* algorithm which allows you to set delegates for all the functions you need to customize and optimize the search.

What I’m working on now is a class for a goal-oriented action planner (see this for what that is). I want it to be generic so that I can use it to plan based on arbitrary definitions of states and actions. Right now I’m trying to figure out how to define a generic state symbol so that it will be workable for different kinds of planning domains. For action effects, it needs to be possible to define the different kinds of things that can happen to a state symbol. (Status added or removed, I guess? And possibly the symbol either added to or reduced if it is something like a numerical dimension?) I have a feeling I may be overthinking it. Numeric variables for state symbols might be overkill.

After that I want to make a hierarchical task network planner, and then start prototyping.

Leave a Reply