• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

SimCity Traffic and AI is broken, Sims are fake

inky

Member
ioiq6ejhqYKPm.gif


This may be THE .gif of this generation.

Even Sims are on strike inside their own game.
 
FUCK EA!

Seriously people, when will y'all learn?

some people never.
we will have these EA discussions bi-monthly forever it seems.

My favorite is the people who defend them saying we just need someone to hate or bandwagon.
yeah because I woke up this morning, scratched my balls and said you know what ill just hate EA just because
 
I'll preface the following by saying that I haven't actually played the new Sim City yet, but I do plan to pick it up sometime soon (once the server issues are ironed out). I do, however, have some small amount of knowledge of academic economic simulation, so hopefully my input might be worth something.

Firstly, agent-based modeling of economic systems is insanely fucking difficult. Even ignoring the computational restrictions, it's a seriously difficult problem to figure out, and there are plenty of very intelligent people trying to do so.

For those that are working on it, they generally only do so with very low-level simulations, modeling a small number of people making simple, isolated decisions. Even then, and without any computational limitations, it's a huge challenge to create a simulation that produces the expected behavior both on the individual level and on the aggregate level.

Maxis, though, are not only attempting to find solutions to these problems, they're doing so on a larger scale and with more interconnected systems than any academic simulation I've ever heard of. The fact that they've managed to create something of this scale that works at all is absolutely astonishing as far as I'm concerned.

Then we move onto the computational limits. If a group of academics were to work on an agent-based simulation of the scale of Sim City, they wouldn't attempt it on anything less than thousands of cores worth of supercomputer, and wouldn't even attemp to run it in real-time even then. Maxis, however, have managed to do so in a real-time game that runs (afaik) on a Core 2 Duo. Again, the fact that it runs at all is a serious achievement.

When it comes to path-finding for vehicles and the like, the big limit that Maxis are coming up against is the computational power of the average PC. Finding the optimal path over a non-Euclidean graph in minimal computational time is something that has a known and relatively simple solution. The issue is that when you're dealing with a graph as complex as the road network in one of Sim City's cities, and are trying to run the path-finding algorithm for hundreds or thousands of cars simultaneously, you need orders of magnitude more computational power than a home PC is going to provide. The only option you then have is to move to a non-optimal heuristic, which finds a "good guess" as to the optimal route. This is what 99% of games do when it comes to pathfinding, as it's computationally much cheaper and for the most part it produces paths that look pretty good. The issue, though, is that any non-optimal pathfinding heuristic is, by definition, going to throw up imperfect routes every so often. This is an even bigger issue when it comes to routing around traffic in a game like Sim City, as you're then dealing with non-Euclidean graphs, which adds a whole extra level of complexity.

There's simply no way around this when working within the confines of a typical PC. Either you go with an optimal solution and the game starts to chug with more than a couple of cars on the road, or you use a heuristic and end up with the occasional illogical traffic jam. It's a mathematically proveable fact, and there's nothing that Maxis can really do about it.

I've been thinking about this too, and I think you're overstating the required complexity a bit though. The difference between academic models and a game model is that academic models aren't going to be able to approximate behaviors in ways that save computational power like you can in a game, since they require accuracy.

For example, pathing. If sims were given a home and a place of employment they would only need to calculate pathing once initially, and subsequently when any changes to the road/transport network occur. There's no need to calculate it every time if the Sim has a starting point and ending point that are constant. The difference being that in an academic model, when a sim ran into regular traffic they would alter their pathing to try to save time, which would require much more frequent path calculations. In Sim City there's no need for that.

So you effectively cut down the time pathing is calculated for sims from constantly running to only running when the portion of the network they utilize changes. That leaves you time to simulate all of the other issues, such as property demand, happiness, etc etc. There's no need to run an extremely complex simulation on a game, when approximating behavior would have been more efficient for the context.

The problem is that they didn't implement either approach appropriately.
 
So, if the always online is justified by the claim that the servers are taking on some of the simulation processing, why is this happening? Must be all of those people who won't stop playing bringing down the server performance.
 
Apparently the Sims don't need job, educations or any way to purchase goods to be perfectly happy and content.

http://www.reddit.com/r/SimCity/comments/1a7iqq/apparently_commercial_and_industrial_zones_are/

Vilavek said:
Guide:

First, plop down any road layout you want, because traffic will never be an issue. Traffic will never be an issue because your sims will have no jobs, and there will be no shops. They stay at home 24/7. Layout your roads to fit maximum density buildings. You can start out with low density roads if you want, but you'll be upgrading to high density the moment all your residential zones are occupied. When there are no longer any free Residential zones, zones start upgrading to higher densities so long as the land value is high enough (more on that later).

As far as services go, you'll want to plop down Power, Water, and Sewage. I didn't do this until sims started to move out of town. Eventually you'll need to plop a Fire Station, Police Station, and Medical, but only when the lack of such causes your sims to die, be killed, or move out (not merely threaten to move out). Sooner is fine too I suppose, if your nice.

Happiness will be an issue with the lack of jobs or shops. But that is okay. Because who needs a job or shops when you're surrounded by Amphitheaters? Place them so that the land value for all Residential zones are maxed out, and your sims will be happy for life as long as the above mentioned services are operational. I should note that the first medium density condos you see prop up will actually hold fewer sims than the single trailers or houses. This will make your population and income decrease at first. Don't be alarmed, just wait it out.

Finally, as your population goes up and your income increases, start lowering the tax rate for low, medium, and high wealth sims. This will also keep them happy, and keep them from moving away. I got my tax rate as low as 2% at one point. By the end of the video, my approval rating was at 89% and I had hit 196k population, and I barely even had to play the game!

EDIT: I should point out that this was done in Sandbox mode! But I do believe it demonstrates a simulation-level issue which does not differ between sandbox and normal modes.

EDIT2: TheIJ and several others say this can be reproduced in non-sandbox mode.

Final Edit: Thanks to unindel and InfiniteBoat for explaining the mechanics for why this apparently works!
 

Chev

Member
It sheds a light on how much of a hog that part can be in a simulation though.
A more representative example would be to take such a simulation that actually is used in a game, and that can put things back in perspective. For example the latest Hitman had it and could only handle something like 1200 "dumb" agents (ie aimless flocking behavior) max (and a small handful of clever ones near the player).
 

Mael

Member
A more representative example would be to take such a simulation that actually is used in a game, and that can put things back in perspective. For example the latest Hitman had it and could only handle something like 1200 "dumb" agents (ie aimless flocking behavior) max (and a small handful of clever ones near the player).

I never said that the example shown was perfect but it's not pointless either.
It's quite clear Maxis didn't do a good job considering the constraint though, no need for a Phd to know that.
 

KKRT00

Member
Umm running MASSIVE, used for the Lord of the Rings AI back in 2001, had these requirements:

Minimum:
  • 1 GHz processor
  • • 512 MB of RAM
  • • NVIDIA graphics card

recommended
  • • 2 – 3 GHz processor
  • • 2 GB of RAM
  • • NVIDIA Quadro FX series graphics card


And does the following:



To say that Maxis, with ten years between main titles, cannot come up with a similar AI that will run on modern computers....actually, one that won't run on their modern server systems since that it what they claimed, is hilarious.

Are You joking?

==
But isnt that what we are all upset about? It looks like Maxis DIDNT design any systems, they just said they did, marketed like they did, and when push came to shove they just threw in the simplest A to B solution they could and probably didn't expect people to examine it as closely as everyone has. A very stupid miscalculation on there part.

Oh come on, most systems are working like they were advertised too [water, pollution, fire, wind], just because they've done some optimization or some solution arent optimal in some cases, doesnt mean its different system. It checks who is in home, who is in work, which buildings are occupies etc It just fails in spots that it shouldnt and thats clearly Maxis fault.
 

Sixfortyfive

He who pursues two rabbits gets two rabbits.
You are incredibly shortsighted if you don't think the pathing and traffic issues described here don't snowball into glaring design flaws in the game's grand-scheme.
I don't know about that. SimCity 2000 is one of my favorite games but had similar shortcomings in the simulation once you broke it down to a science. In particular, I recall pretty much every transportation method but plain roads+buses to be useless, and that example about sims simply taking the shortest route to any available res/com/ind zone (as opposed to one that was specifically designated for them) was no less true then than it is now.

If you're going to argue that these things should evolve in complexity after ~20 years, fine. Doubly so if the reasoning for this half-baked DRM is to supposedly allow more complex computations on the server side. If any of it is a step back from SimCity 4 (never played it), that's also a reasonable critique. But to act like any of it is game-breaking on its face is really silly. A lot of the fun in SimCity, in my opinion, is discovering exactly how the rules work and then figuring out how to exploit them for whatever goal you have in mind.

And I've been hating on this game constantly.

EDIT: Some of the bugs/quirks described in this thread are boneheaded enough on their own. Not arguing that. I just don't think the OP alone makes a very compelling case.
 

Kabouter

Member
In a 100k city (99,658 to be precise :p) running at llama speed (since cheetah is disabled), both cores on my ancient Core 2 Duo E8500 seem to be at about 75-80%, if that helps anyone. This is just looking at the task manager, I don't know how accurate that is or whatever.
 

Kabouter

Member
you should.

gaf doing a playthrough here

it is a great game

It is, but even with mods, I can never help but feel that whenever I start it up that I have gotten pretty much all I'm going to get out of the game, and I quickly stop playing. I've played too much SC4 at this point. CitiesXL never quite did it for me, though I don't think they're bad games by any means and have enjoyed playing them a bit. I was really hoping this new SC would deliver a fresh, quality experience. Incredibly disappointed.
 

Dragon

Banned
IMO, calling this an Alpha is being kind. It's forgivable that every Sim is not being simulated individually. The traffic, public transport and service vehicle flaws are not. We'll use fires as an example as how it should be done:

1) Fire breaks out in a building.
2) Game should determine if you have a fire station and the number of trucks available to respond.
3) Game should determine how many trucks are necessary to combat the fire.
4) Game dispatches appropriate number of trucks, sending them on the shortest available path. If gridlock exists, search for a way around, even if it adds to the response time a bit. (Note: The game can ALREADY determine differing levels of gridlock.)
5) Game retains surplus firetrucks at station(s) to be dispatched on other fires.

How it is actually handled:

1) Fire breaks out in a building.
2) Game responds with all available trucks.
3) All other fires burn out of control.

That's gamebreaking, even with small map sizes. You can apply the same thing to all the other service vehicles.

I don't understand how things like this get through playtesting. So the only thing I can conclude is they actually wanted this to be the algorithm for dealing with fires which is so asinine that it doesn't even warrant thinking about any further.
 

KKRT00

Member
In a 100k city (99,658 to be precise :p) running at llama speed (since cheetah is disabled), both cores on my ancient Core 2 Duo E8500 seem to be at about 75-80%, if that helps anyone. This is just looking at the task manager, I don't know how accurate that is or whatever.

A little, but i'm more interested in scaling :), thats why i wrote 1k, 10k and 100k, because we could see the trend of increasing agents AI for CPU utilization and we could estimate what would be need for bigger cities in terms of cpu requirements in future releases.
 

ekim

Member
It is, but even with mods, I can never help but feel that whenever I start it up that I have gotten pretty much all I'm going to get out of the game, and I quickly stop playing. I've played too much SC4 at this point. CitiesXL never quite did it for me, though I don't think they're bad games by any means and have enjoyed playing them a bit. I was really hoping this new SC would deliver a fresh, quality experience. Incredibly disappointed.

Have you tried cities in motion?
 
Again, can anyone with the game test CPU utilization with 1k, 10k and 100k city on high speed? Thanks.

We cannot downplay optimization solutions of algorithms if we dont know their cost. Its like people would downplay LOD issues of shadows or reflections being only screenspace because we cant use ray-tracing.

This is what i collected so far.

CPU:AMD Phenom QuadCore 3.2Ghz

Citizens = Cpu Usage
1400 = 33%
3400 = 35%
5000 = 36%
15000 = 37%
33000 = 38%
51000 = 39%
 

Kabouter

Member
Have you tried cities in motion?

Yes, it's a pretty entertaining game, though not really a city builder. It's purely about managing transport. That game had some issues, and still does have some, but it's pretty entertaining overall. Your mentioning it does remind me though, if Maxis wants some easy fixes, how about letting me determine routes myself for (school) buses and other forms of public transport?
 
I don't know about that. SimCity 2000 is one of my favorite games but had similar shortcomings in the simulation once you broke it down to a science. In particular, I recall pretty much every transportation method but plain roads+buses to be useless, and that example about sims simply taking the shortest route to any available res/com/ind zone (as opposed to one that was specifically designated for them) was no less true then than it is now.

If you're going to argue that these things should evolve in complexity after ~20 years, fine. Doubly so if the reasoning for this half-baked DRM is to supposedly allow more complex computations on the server side. If any of it is a step back from SimCity 4 (never played it), that's also a reasonable critique. But to act like any of it is game-breaking on its face is really silly. A lot of the fun in SimCity, in my opinion, is discovering exactly how the rules work and then figuring out how to exploit them for whatever goal you have in mind.

And I've been hating on this game constantly.

I think the issue is that Maxis hyped up their agent system and much of the behavior is either broken or counter-intuitive. Roller Coaster Tycoon's agent system was pretty wonky as well, but it didn't cripple or hinder progress on building a theme park. It also doesn't help that the small city size magnifies the problem (since you can just expand outwards in the older games).

Sim City 4 had similar problems fyi and it took until Rush Hour and NAM before everyone placed it back as their favorite city builder game.
 
I have never played Simcity before but now dying to play Simcity 4

As much as I love it, you might want to start with SC2K. SC4 is unforgiving when it comes to poorly planned cities and has a lot of stuff going on. I know several long-time SimCity fans who struggle with it. It is, however, an extension of the SC2K game so that's a good intro point.

SC3K might be better, I didn't play it much so I'm not sure but according to Gooster it's not available online though I don't know that either since I'm SC4-4-life now apparently.

Yes, it's a pretty entertaining game, though not really a city builder. It's purely about managing transport. That game had some issues, and still does have some, but it's pretty entertaining overall. Your mentioning it does remind me though, if Maxis wants some easy fixes, how about letting me determine routes myself for (school) buses and other forms of public transport?

I don't know, can the casual/iOS fans handle that? Of course it could be an option. Could be, maybe in a future expansion pack.

Also, love that idea, love it.
 

Kazerei

Banned
You know.. I'd really be interested in trying it, if not for the fact that the game is basically already finished. And by that I mean, someone literally ended the game for everyone:

evqYGbkh.jpg


Thats the only way to build an efficient city. Once you know that, its like playing an RPG where the enemies defeat themselves. The gameplay becomes pointless.

I still can't wrap my head around how or why this is the most efficient design. What the fuck, Maxis.
 

Toma

Let me show you through these halls, my friend, where treasures of indie gaming await...
I still can't wrap my head around how or why this is the most efficient design. What the fuck, Maxis.

Reading the OP, I understand exactly why its the best design of a city in the current state of the game. However, it shouldnt be. No clue why anyone at Maxis thought that this is playable.
 
I still can't wrap my head around how or why this is the most efficient design. What the fuck, Maxis.

Unless they patch it, I can't wait to see what crazy designs people come up with in order to be as most efficient as possible. That spiral road could be fine-tuned even further just looking at it.
 

beje

Banned
Every single piece of info that pops up about this trainwreck makes me think they just went "give the project to our interns while we keep on doing DLC and expansions for The Sims". How not just testers but REVIEWERS didn't "manage" (lol, yeah, right) to find out about this stuff makes the issue even more appalling. "Yeah, it works, and I click, create a road and people do stuff and buildings grow HEY I CAN CLICK A PERSON AND CAM WILL FOLLOW IT GIVE IT A 9,5 GAME OF THE YEAR"
 

The only thing better would be A Wrinkle in Time style system where every worker leaves at the exact same time and arrives home to pull into their driveway at the exact same time.

I don't understand how things like this get through playtesting. So the only thing I can conclude is they actually wanted this to be the algorithm for dealing with fires which is so asinine that it doesn't even warrant thinking about any further.

I'm starting to think the theories that this was a facebook game shifted to PC after facebook games collapsed are right. In that case EA had already been working on it for some time, and the focus was on getting it transitioned and released ASAP and not fixing glaring problems.

Oh wow I haven't heard this but it seems totally plausible. I knew there was some kind of Civ Rev for Facebook in the works at some point too.

It's mentioned over the last pages of this thread I believe. That was Civ world, released a couple years ago and forced people to play a stripped down Civilization of some sort in a region with other players. Looking it up it flopped (well I knew that) and is being discontinued in May.
 
I'm starting to think the theories that this was a facebook game shifted to PC after facebook games collapsed is right. In that case EA had already been working on it for some time, and the focus was on getting it transitioned and released ASAP and not fixing glaring problems.

Oh wow I haven't heard this but it seems totally plausible. I knew there was some kind of Civ Rev for Facebook in the works at some point too.
 

pottuvoi

Banned
Thats a possibility too, but they COULD actually simulate that sim easily as I said in the post above.

Just put him in a free apartment or then "delete"/"leave" the city. The Sim could even drive to a free department after work, or if he cant find any, drive out of town. There you go, somewhat believable simulation accomplished.
Also the concept of homeless people would be quite easy to implement.
Without house and money some of them would turn into a crime.. etc.

Proper simulation of poverty is a must for game like simcity.
This is what i collected so far.

CPU:AMD Phenom QuadCore 3.2Ghz

Citizens = Cpu Usage
1400 = 33%
3400 = 35%
5000 = 36%
15000 = 37%
33000 = 38%
51000 = 39%
Doesn't really look like CPU usage is a problem.
Although with this level of simulation I really wouldn't expect it to be.
 

LakeEarth

Member
I still can't wrap my head around how or why this is the most efficient design. What the fuck, Maxis.

No stops signs or street lights to slow down traffic. Though by "why", you could be asking it in a "why did Maxis blow the design so much that this works best?", in which case, I have no answer.
 

Raticus79

Seek victory, not fairness
I still can't wrap my head around how or why this is the most efficient design. What the fuck, Maxis.

It sidesteps the problems with service dispatch and turns the whole game into a model of a single-loop bloodstream. White blood cells don't need to know pathfinding - as long as some are in there, they'll eventually pass by what needs handling. It's actually better overall to have the trucks randomly distributed by the traffic conga line instead of having them all reach the same fire.
 

M3d10n

Member
What boggles the mind is that the current system could work if a sim agent flagged the selected destination home/job as "occupied" at the start of it's transit, not at the end. This would cause all agents leaving at the same time to pick different destinations and not move as a horde. Same for fire and police cars: if the traveling car flags the fire/crime as being "occupied", other cars would move to different ones in parallel.
 
Apparently the Sims don't need job, educations or any way to purchase goods to be perfectly happy and content.

http://www.reddit.com/r/SimCity/comments/1a7iqq/apparently_commercial_and_industrial_zones_are/

Now, why are your residents staying happy? They should normally be getting most of their happiness from spending money at commercial sites as shoppers; just the existence of services/parks shouldn't be enough! Well according to the observations from that other thread I linked, sims can "shop" at parks, but that doesn't deduct from their money (from the other thread: "Can Shop at Park bringing 1 happiness Park Happiness IS Free, but you need to have money to bring with you and you get it back after visiting the park.")
So basically the sims are slowly accumulating some money from the service jobs and then getting happiness from visiting the park while they hold on to their money. The money never runs out which is why this allows growth at a non-trivial rate (once a house gets some money the shoppers will start accumulating happiness for the house until it maxes out and upgrades density. The money accumulates each time a sim brings back its income which makes the next wave of shoppers bring in even more happiness).

Sims will shop CONTINUOUSLY at the park for happiness... so long as they have one dollar they will be able to walk accross the street and get free happiness.
With your tax rate so low ~2% the microscopic income from working at the parks (5-6 jobs) will be enough to have the building not go bankrupt and they will have infinite free happiness.

Free happiness sounds good though.
 

Rapstah

Member
Imagining the world in which the ways the Sims act are normal is hilarious. It's like some 1930s view of "the world in the year 2000!" only nothing is thought through.
 

SapientWolf

Trucker Sexologist
I've been thinking about this too, and I think you're overstating the required complexity a bit though. The difference between academic models and a game model is that academic models aren't going to be able to approximate behaviors in ways that save computational power like you can in a game, since they require accuracy.

For example, pathing. If sims were given a home and a place of employment they would only need to calculate pathing once initially, and subsequently when any changes to the road/transport network occur. There's no need to calculate it every time if the Sim has a starting point and ending point that are constant. The difference being that in an academic model, when a sim ran into regular traffic they would alter their pathing to try to save time, which would require much more frequent path calculations. In Sim City there's no need for that.

So you effectively cut down the time pathing is calculated for sims from constantly running to only running when the portion of the network they utilize changes. That leaves you time to simulate all of the other issues, such as property demand, happiness, etc etc. There's no need to run an extremely complex simulation on a game, when approximating behavior would have been more efficient for the context.

The problem is that they didn't implement either approach appropriately.
I suspect that memory would be a concern as well. If each citizen is an object and you have 100k of them then that's going to add up. Another reason why devs need to go 64-bit.
 

beje

Banned
What boggles the mind is that the current system could work if a sim agent flagged the selected destination home/job as "occupied" at the start of it's transit, not at the end. This would cause all agents leaving at the same time to pick different destinations and not move as a horde. Same for fire and police cars: if the traveling car flags the fire/crime as being "occupied", other cars would move to different ones in parallel.

Yup, it's all "Babby's first pathfinding algorithm in Computer Science I" all over it. I haven't coded anything in the last 4 years and I know I would be able to do something more efficient in a few weeks... you know, even with all the extra GB of RAM we have in modern PC's I could even set a couple of "home" and "work" variables in each sim that wouldn't take more than a 32 bit integer each one, which would ammount for the humongous size of 8 MB of total extra data for a 1 million real population (not in-game padded population)
 
Top Bottom