# WireZapp

Member

30

155 Neutral

• Rank
Member
1. ## Data Oriented Design for AI?

Glad that worked out for you! :D

3. ## Need some help with a path finding issue.

I should have added that there can be up to 256 different types costs that the agent would need to take into account.   (ie: Wealth, Hunger, Water, etc)   The A* is what I'm doing now, but your approximation method sounds much better than mine :)
4. ## Need some help with a path finding issue.

http://www.reddit.com/r/gamedev/comments/2rjgwi/path_finding_question/   "Lets say I have a very large amount of islands, and my agent wants to get to a certain island. Islands usually can allow the agent to jump to the 6 closest other islands; however, sometimes a path may be blocked (ie: 2 islands are fighting and the agent can not easily pass between them) and the agent may be either required to go around or wait until they have the required resources to pass. There are some things that make this really tricky for me: The islands are not grid based; rather, their distribution is random. The agent cannot travel back to an island its already been at; however, it can stay at an island for a finite number of turns. Every turn it collects more resource, and can pass through island barriers if the resource requirement is met. This is just an analogy for an issue I'm having for my engine. But the solution to this problem should suffice very well. Broken down: Agent starts at island A with 5 resource. Island B requires 4. Agent Jumps to Island B. Agent now has 1 resource. Island C requires 7 and is the next obvious destination for the agent in order to reach its final goal. Agent waits at B for X turns until it has the required resource. Agent jumps to island C. Etc I don't want to use anything more complicated than basic arithmetic since this method will only be used for approximation of actual paths. Any help on how to approach this?"
5. ## Data Oriented Design for AI?

First of all this is a very nice compilation of sources! Awesome!   Secondly, it just comes down to how you design it like any normal system. I've been working on a DOD based multiagent fuzzy logic sdk for a while now. While my system is more oriented around prediction modeling than the average AI engine for a game, DOD is a near perfect match for most things.   However, there are still times that I can't use Data Oriented Design in my system. While I'd love to have everything based around it, look up tables for entity attributes, as well as gradients for the NNs are stored hiearchly.   I have a nice wiki page for my engine summing this up quite well: https://github.com/MatrixCompSci/DOT/wiki/Basics-to-DOT%27s--AI (Don't bother looking through the source. This is all pre-alpha and was mostly a proof of concept for the editor. The alpha releases sometime in January)   The hiearchies are just for specifing template objects that the instances of entities are copied from. Tagging on the other hand is nearly 100% DOD, and the performance increase for caching is highly evident.   After an entity is instanced, there is no further need in the system for OOP. Everything gets handled through the tag system. Updates, LOD shifts, blackboards. Even machine learning and scheduling get handled through tags.   One other thing. Pre-DOD the memory requirement of an Entity was 117 bytes. I just took a remesure 15min ago, and its now down to about 30 bytes. From DOD alone, we dropped from 117 bytes to 44 bytes.   DOD is awesome for AI, if your entire system is not done with DODs. Sometimes you'll actually end up using less memory, and be generally more efficient, when sticking to OOP.
6. ## Unsure of which multidimensional nearest neighbour algorithm to use

For dynamic points, basically they can travel to any point that has a viable path to it (Just a normal A* implementation). The trajectories can be predicted, but not that far before hand. If an NPC grabs food on the way to work, theres a pretty good chance that it will actually get to his job before he eats it.   Some could be confined. Most couldn't though. I could say that an advertisement causes strain on an NPC after he's held it for a while (That would make a really nice bounding sphere around cities and stuff). But as you'd imagine, the results would vary

8. ## Unsure of which multidimensional nearest neighbour algorithm to use

http://stackoverflow.com/questions/27204935/unsure-of-which-multidimensional-nearest-neighbour-algorithm-to-use   " I'm currently working on a project that requires a thread to construct a queue of 30(ish) nearest processes closest to the player within a 3D environment. All of these processes can move about the environment, as well as leave their starting nodes that they were placed in. I have considered using R trees, but due to its ludicrously high insert times, it does not seem very viable. KD- Trees would not work, since they tend to only work for static environments. Note also that this will be running async to the main update thread, so an atomic approach would work best. Can someone suggest an approach? "
9. ## Using machine learning to predict the collapse & stabilization of complex systems?

I made various other optimizations to the point where calculating a score takes so little time that it isn't really worth it for me to implement this anymore
10. ## Crowd simulation

I wasn't stating that "This is the way that advanced AI work" I was giving a comparison that a system with various features would be most likely more complex than a system that consisted only of a roaming algorithm implementation. But yeah, I see what you mean, the reply I made was worded poorly. Obviously extremely complicated behavior can be made with finite state systems, and/or various other methods.   Also, I completely forgot there was a difference between accuracy and detail (My physics professor would have killed me haha)
11. ## Crowd simulation

Well, how accurate are you going for? On one end of the spectrum, you have a fuzzy logic control system with clustering, opinions, and remedial information propagation (Whether through Backpropogation with NN, or just super basic AI one approaches AI two, AI one says "The player did this", AI two now dislikes player). On the other side the spectrum, you have a super elementary Roaming algorithm. It all comes down to how detailed you want it to be
12. ## Using machine learning to predict the collapse & stabilization of complex systems?

I did some research into stability theory. I didn't realize how huge this particular field of research is; however, I still don't know how to approach this. There are countless different theorems and algorithms, all of which I imagine have varying complexities for a C++ implementation
13. ## Using machine learning to predict the collapse & stabilization of complex systems?

I hadn't fully considered that for the advertisements. Jeez.   And yeah, I've considered a lot more optimizations that can be made. We're trying to redesign the scoring system to be a lot more parallel. That won't give the full performance increase we want.   We're using the engine to create a political simulator (Just as a tech demo, not a final game). The player tries to design a new law (through a flow graph system), raise taxes, start new cities, etc to keep his citizens happy.We also figured out for this to be enjoyable we would need a few hundred thousand entities, and perhaps anywhere from 50k - 60k advertisements. We're aiming for a 10 second delay between turns. Where our AI engine stands right now, our in house testing rig can run through all those entities in about 98 seconds. We're hoping adding GPGPU will bring that time down to a more reasonable 50 seconds but, that's still too long.   We also noticed that close to 80% of the time (when the player is playing well) the system was just creating repetitive patterns, and was highly stable. When the player didn't do well, that number was closer to 50%.   We've tried various prebaking methods, and while they greatly reduce computation time, they don't give as enjoyable of a result.   On a side note: We have various other optimizations that were made. For instance, originally each entity held their own copy of the AI events relating to their nearest neighbor. Like neighbor A would remember if neighbor B committed some crime, and would view the event in different light based on their opinion on the player and that particular neighbor. When we first implemented this, it was brutally slow, increasing computation time by a huge factor. After various optimizations and what not, it no longer effects performance (welll... it adds a second or two).
14. ## Using machine learning to predict the collapse & stabilization of complex systems?

Huh... thats a really good point. People though believed they were stable until right before the recession, so I imagine that you can know if you're stable from a history of data as well. Obviously that would be an approximation, and a false positive at that, but at least it could be correct over a constant time interval.
15. ## Using machine learning to predict the collapse & stabilization of complex systems?

I didn't actually mean the graph. I meant the next "Values" for the next iteration.   But I solved it. (Well, I didn't. I sent the code to a friend who is a specialist in Econometrics). I'm storing Markov Chains of the advertisements the agent picks. So if it decides to eat, from a track record, there is a 15% chance that it'll want to sleep next. Role a random number generation, and execute the probability it lands on. Large number theorem allows these probabilities to approach their true value as the sample size tends to infinity, so I imagine this would produce quite accurate results. I could even just throw an if statement or two in there for good measure.