Tag Info

New answers tagged


So this is basicaly topographical sorting problem. You have a graph, each node is a task that needs to be done, and some nodes depend on some other nodes (this is represented by an edge in the graph from depending node to the node it depends on). You want to do all the tasks, so you need to produce SOME ordering of the nodes that is topographicaly OK (the ...


If you can make sequences pretty general, there's not much of a spaghetti code. In case of deliveries e.g.: WorkTask operates with a WorkPlan. Workplan says what kind of resource unit must pick, from what kind of house, using which walk animation, using which work animation, time to work and all such details. So in the end WorkTask might look like: Find ...


At first you see that your commands are in the form of a list, so your first instinct might be to recreate that structure, and each dwarf will run through that list in sequence. What I suggest though is to break the list into steps, with each step having prerequisite(s), and then you run the entire command in reverse. Let me demonstrate with an example: ...


Have a look at Monte Carlo Tree Search (like min max but prunes the kind of large trees you see in games these days with large branching factors). http://en.wikipedia.org/wiki/Monte_Carlo_tree_search http://aigamedev.com/open/coverage/mcts-rome-ii/ http://www.aot.tu-berlin.de/fileadmin/files/lehre/diplomarbeit/BA_Barbara_Konz.pdf

Top 50 recent answers are included