Algorithms for City Simulation? [closed] - algorithm

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I want to create a city filled with virtual creatures.
Say like Sim City, where each creature walks around, doing it's own tasks.
I'd prefer the city to not 'explode' or do weird things -- like the population dies off, or the population leaves, or any other unexpected crap.
Is there a set of basic rules I can encode each agent with so that the city will be 'stable'? (Much like how for physics simulations, we have some basic rules that govern everything; is there a set of rules that governs how a simulation of a virtual city will be stable?)
I'm new to this area and have no idea what algorithms/books to look into. Insights deeply appreciated.
Thanks!

I would start with the game of Life.

Here is the original SimCity source code:
http://www.donhopkins.com/home/micropolis/micropolis-activity-source.tgz

It may be hard to find any general resources on the subject, because it is quite specific area.
I have implemented some population dynamics and I know that it is not easy to get all the behavior correct to ensure that the population does not die off or overgrows. It is relatively easy if you implement a simple scenario like in predator-prey model, but tends to get tricky as the number of factors increases.
Some advice:
Try to make behavior of agents parametrized
Optimize the behavior parameters using some soft method, a neural network, a genetic algorithm or a simple hillclimbing algorithm, optimizing a single parameter of the simulation (like the time before the whole population dies off combined with average growth factor)

Here is a pointer to some research on the topic, but be advised -- the population in this research study all died off.
http://www.nsf.gov/news/news_summ.jsp?cntn_id=104261

Related

Which navigation methods would be the most performant and flexible for a game with a very large number of AI on a dynamic playfield? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I'm not 100% sure what factors are important when deciding whether to use Unity's NavMesh vs an advanced pathing algorithm such as HPA* or similar. When considering the mechanics below, what are the implications of using Unity's NavMesh vs rolling my own algorithms:
Grid based real-time building.
Large number of AI, friendly, hostile, neutral. Into the hundreds. Not all visible on screen at once but the playfield would be very large.
AI adheres to a hierarchy. Basically does things where AI entities issues commands, receive commands, and execute them in tandem with one-another. This could allow for advanced pathing to be done on a single unit that relays rough directions to others where they can commence lower-level pathing to save on performance.
World has a strong chance of being procedural. I wanted to go infinite proc-gen but I think that's out of scope. I don't intend on having the ground plane being very diverse in regards to actual height, just the objects placed on it.
Additions and removals within the environment will be dynamic at run-time by both the player and AI entities.
I've read some posts talking about how NavMesh can't handle runtime changes very well but have seen tutorials/store assets that are contrary to that. Maybe I could combine methods too? The pathing is going to be a heavy investment of time so any advice here would be greatly appreciated.
There are lots of solutions. It's way too much for a single answer, but here's some keywords to look into:
Swarm pathfinding
Potential fields
Flocking algorithms
Boids
Collision avoidance
Which one you use depends on how many units will be pathing at a time, whether they're pathing to the same place or different places, and how you want them to behave if multiple are going to the same place (eg. should they intentionally avoid collisions with each other? Take alternate routes when one is gridlocked? Or all just stupidly cram into the same hallway?)

Deep Learning, recommandation regarding which architecture to use [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm currently developping an application which allows psychologists to manage their schedule and budget. As a proof of concept, I would like to create an intelligent appointment service. There can be 3 cases:
I know the client, I need to guess the day and time for his next appointment
I know the day, I need to guess which client and at what time
I know nothing, I need to guess which client, which day and what time
I'm currently in the process of learning deep learning algorithms just to get a bit of theory, but it's a little bit overwhelming.
There are features I know I can extract from the appointments:
Day preference in the week (always on monday, say)
Reccurence (every two weeks or such)
Nb of days since last appointment
Whether the client was present or not to his last appointment
etc..
I know there are things like "features extraction" that you can train a neural network to find the features itself, but all examples refers to image recognition or speech analysis.
I want the algorithm to train on the existing and future appointments (stored in a MongoDB). I would also like that the algorithm trains live, that is if it proposes an appointment to the user and the user takes it, it should train positively. On the other hand, if the user navigates or change any parameter, the algorithm should adjust its weights accordingly.
I also know I should start by extracting data from the DB that will be transformed in a vector or matrix, then the algorithm is supposed to train on that data.
Is this correct? How can I start and what kind of architecture do I need?
Since It's a POC, I assume you don't have a large dataset, I would not recommend to go with deep learning, start with something smaller like a decision tree kind of algo and when you have good amount of data, move to deep models. Why? It's always easier to tweak the tree kind of model and explain it to client too. Also, as suggested by Prof Andrew NG, Deep learning require at least 100K observations to learn and perform well. With simulated dataset, it's always unpredictable.

Module development time ( cost ) estimation [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I need some idea regarding the development time estimation of a to be developed software. Though there are formal methods in theory like COCOMO , Function point ,etc, such methods seem impractical to apply before having any work done. (I am not sure if possible?)
I have attached a sample module. Please help me in learning estimation in the practical purpose.
Scenario: Student Registration Module
Check whether the student is new or already registered.
1.1. if already registered then activate the registration
1.2. If new student then, Record all the necessary data related with the new student. (certificates in different formats like pdf,docx, jpg,png)
Check for late registration. If late then apply late registration fee.
Time check: student registration must be done within a week of academic session start.
Also, I think the development time may differ in terms of programming language used. For eg. Java , C sharp or PHP. Please guide me with your understanding.
Thanking You.
I would warmly suggest you to read the book "Software Estimation: Demystifying the Black Art" by Steve McConnell.
You'll get many useful thumb-rules from there. Many derived from COCOMO :-)
E.g. the fact, that as you state the time will be different depending on programming language. It's true. some studies have found out, that the number of LOCs produced by a programmer doesn't depend on language. But the productivity of those lines does.
So some very basic rules in software-estimation:
Understand the cone of insecurity
Give estimate in ranges, not
in single numbers
Re-estimate continuously
Divide the task in
as many as possible smaller task, and estimate them individually.
Estimate in this order: size, effort, costs/schedule

What makes a task difficult or 'complex' to machine learn? Regarding complexity of pattern, not computationally [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
As many, I am interested in machine learning. I have taken a class on this topic, and have been reading some papers. I am interested in finding out what makes a problem difficult to solve with machine learning. Ideally, I want to learn about how the complexity of a problem regarding machine learning can be quantified or expressed.
Obviously, if a pattern is very noisy,one can look at the update techniques of different algorithms and observe that some particular machine learning algorithm incorrectly updates itself into the wrong direction due to a noisy label, but this is very qualitative arguing instead of some analytical / quantifiable reasoning.
So, how can the complexity of a problem or pattern be quantified to reflect the difficulty a machine learning algorithm faces? Maybe something from information theory or so, I really do not have an idea.
In thery of machine learning, the VC dimension of the domain is usually used to classify "How hard it is to learn it"
A domain said to have VC dimension of k if there is a set of k samples, such that regardless their label, the suggested model can "shatter them" (split them perfectly using some configuration of the model).
The wikipedia page offers the 2D example as a domain, with a linear seperator as a model:
The above tries to demonstrate that there is a setup of points in 2D, such that one can fit a linear seperator to split them, whatever the labels are. However, for every 4 points in 2D, there is some assignment of labels such that a linear seperator cannot split them:
Thus, the VC Dimension of 2D space with linear seperator is 3.
Also, if VC dimension of a domain and a model is infinty, it is said that the problem is not learnable
If you have strong enough mathematical background, and interested in the theory of machine learning, you can try following the lecture of Amnon Shashua about PAC

How would be an algorithm to simulate human interaction? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
Let's suppose that androids which are physically alike humans are a reality.
What would be an algorithm to make it interact with human beings if we want it to:
1) be indistinguishable from regular people in behavior
2) be as equally friendly to everyone as possible?
I understand that it is very hard to write an algorithm like that. I can, however, imagine an android simulating human behavior fairly well with some sort of machine learning technique.
But how would we train it? The act of collecting data would also be a big big problem.
Which machine learning technique would be ideal?
If you consider requirement 1 to be a hard requirement, such an algorithm would beat the Turing Test at least to some extent, so it would be a pretty advanced (world-class) algorithm.
Your problem basically equates to beating the Turing Test, so check the linked article to see the scientific literature produced by people working on this problem.
Assuming massive data availability and processing power are basically unbounded, I believe an Artificial Neural Network would be the best runner-up to base such an algorithm on.

Resources