• 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

Rapstah

Member
More testing. If you have several, equally long roads to one destination. Which one is picked, seems to be completely at random. The best part is that all subsequent cars use the same road to get there, always.

Imagine a square, with corners A, B, C, D - and you're gonna get from A to C, and they're diagonally opposed. If a car drives ABC or ADC is completely random, but for the same reason, all subsequent cars travel the exact same road. I'm gonna see if I can figure out what sets which one is used (because it's something. If it was random, half the cars would go one way, and the other the other)

Greedy pathfinding algorithms will always pick the same path through a given graph regardless of what we see as several equally valid paths. As long as they use the same ruleset, 1500 found paths A->B through the same graph will always result in the same path.
 
I just did some testing to try and find out the optimal way to lay out my city. Then I found this gem. This is the shortest route:

Wow that is a really simple A* algorithm they have.
From what i think they have is.

A car agent gets a shortest path over the graph(roads network) and then the road will handle the rest.
 

ascii42

Member
Greedy pathfinding algorithms will always pick the same path through a given graph regardless of what we see as several equally valid paths. As long as they use the same ruleset, 1500 found paths A->B through the same graph will always result in the same path.

Right, basically it's missing factoring traffic into the cost of each segment. If they add that into the ruleset, you'd see some different results. Shouldn't even be that hard to add, if they think of cost in terms of time to travel from intersection to intersection.
 
I haven't been visiting GAF lately so I have been behind on the news. I was just about to make my purchase after seeing the thread about the offline play workaround and now I see this. What a mess.
 

Septimius

Junior Member
Would they use use ABC road one day and ADC the next day? or is it just set after the first random roll?

It's not random, they'll always pick the same route, and that makes sense, as Rapstah says:

Greedy pathfinding algorithms will always pick the same path through a given graph regardless of what we see as several equally valid paths. As long as they use the same ruleset, 1500 found paths A->B through the same graph will always result in the same path.

Yeah, so the clue was to find what this rule was. What I found was that when you have a square (that is, a regular quadrilateral -> four equal sides and four right angles), it's the road most recently laid that will be used.

What I found further, is that if it is a rectangle, when choosing between ABC and ADC, it'll choose the one with the longest uninterrupted (no intersections) road.

Imagine the rectangle ABCD, where AB and CD are longer than BC and AD. When entring at A going to C, it will go A -> B -> C. Going from C, it will go C -> D -> A (since CD is longer than BC).

This means it's near impossible to build a city with a good traffic flow, since the problem will be recursive when adding smaller squares to a big square of avenues, since a road sticking out of an avenue always has to be shorter than the part up to the next intersection in the avenue

Right, basically it's missing factoring traffic into the cost of each segment. If they add that into the ruleset, you'd see some different results. Shouldn't even be that hard to add, if they think of cost in terms of time to travel from intersection to intersection.

You'd have incredible results just weighing the road based on its road type. It would mean that all traffic would stick to avenues instead of small roads when the small road is equal to the avenue distance. That's literally a change to one line in the algorithm, and it won't affect performance at all.
 
Right, basically it's missing factoring traffic into the cost of each segment. If they add that into the ruleset, you'd see some different results. Shouldn't even be that hard to add, if they think of cost in terms of time to travel from intersection to intersection.

The roads probably only have a distance/length score. They could add a car count/traffic score on the road perhaps. To make better use of the available data the game has.
So congested roads have a high traffic score so less likely to be taken.

But then again i saw the minimum cpu and memory specs and they are really low for these day and age. They should have put down a dx11 gpu as a minimum so they could offload some of the calculation to the gpu.

If the game is good most people will upgrade their rig for the game anyway.
 

codecow

Member
Right, basically it's missing factoring traffic into the cost of each segment. If they add that into the ruleset, you'd see some different results. Shouldn't even be that hard to add, if they think of cost in terms of time to travel from intersection to intersection.

This is true but it would negatively effect search performance, not sure if that's an issue with the game or not.
 

Danj

Member
You'd have incredible results just weighing the road based on its road type. It would mean that all traffic would stick to avenues instead of small roads when the small road is equal to the avenue distance. That's literally a change to one line in the algorithm, and it won't affect performance at all.

Is this something that could be changed somewhere in all this moddable Javascript that's been discovered in the game?
 

Rapstah

Member
They could probably weigh in traffic into the graph and recompute all paths every time a road changes its traffic density colour from nothing to green, from green to yellow, or from yellow to red, or vice versa. Ideally this doesn't happen more than a couple of dozen times per second.
 

Septimius

Junior Member
Is this something that could be changed somewhere in all this moddable Javascript that's been discovered in the game?

Sadly, no. Or anyway extremely unlikely.

They could probably weigh in traffic into the graph and recompute all paths every time a road changes its traffic density colour from nothing to green, from green to yellow, or from yellow to red, or vice versa. Ideally this doesn't happen more than a couple of dozen times per second.

I still say just weight the road type. Smaller roads, higher weight. Exact same computation time, and use bit-shift to multiply for efficiency even - unless it's in JavaScript, which fantastically manages to use more time bit-shifting than multiplying. But it isn't js, luckily.
 
This is true but it would negatively effect search performance, not sure if that's an issue with the game or not.

I don't even think the city are big or complex enough to even bring down a modern cpu.
My CPU hardly rose over the 40% usage with a 200k city and massive amount of traffic.

They could process more agents if they only calculated partial routes so take the first 5 roads edges and travel along it. Then after it is at a stopping point recalculate the next 5 road edges to travel along probably with more updated data to use. But keeping a traffic count and would hardly add any memory and processing it is just one more add to a score you need to do when calculating roads. And one more add for the system that handles the road graph.

Should make the cars also more dynamic and reallife or it would fuck things up bad.

Is this something that could be changed somewhere in all this moddable Javascript that's been discovered in the game?

This is probably logic that you want to run fast. Not something you want designers to fuck around with. But in this case it probably would have been better :p
 
More testing. If you have several, equally long roads to one destination. Which one is picked, seems to be completely at random. The best part is that all subsequent cars use the same road to get there, always.

Imagine a square, with corners A, B, C, D - and you're gonna get from A to C, and they're diagonally opposed. If a car drives ABC or ADC is completely random, but for the same reason, all subsequent cars travel the exact same road. I'm gonna see if I can figure out what sets which one is used (because it's something. If it was random, half the cars would go one way, and the other the other)

You would think they would add some value that correlates to traffic congestion, and have it "add" to the distance to reach destination. That would quickly distribute the traffic I would think.

Moreover, while I forget the name of the region, but it is the one with the highway doing an "arc" though the map on the three city region, I quickly discovered when I made a "L" dirt road between the two "end points" of the highway arc (in order to place utilties in that corner), I soon noticed that ALL the highway traffic was suddenly going down the dirt road. Not only was the distance longer, but it went down the crappiest road possible. I was mindblown...
 

Septimius

Junior Member
You would think they would add some value that correlates to traffic congestion, and have it "add" to the distance to reach destination. That would quickly distribute the traffic I would think.

Moreover, while I forget the name of the region, but it is the one with the highway doing an "arc" though the map on the three city region, I quickly discovered when I made a "L" dirt road between the two "end points" of the highway arc (in order to place utilties in that corner), I soon noticed that ALL the highway traffic was suddenly going down the dirt road. Not only was the distance longer, but it went down the crappiest road possible. I was mindblown...

No, all L-shapes create an equal total sum, so long as the are right angles. Imagine a huge L. No matter how many small Ls you use to create a way between the top and the bottom-right point of the huge L, the sum of the small Ls and the two long roads will always be equal. Distance is the only thing that matters in this game.

Visual representation:

Code:
|_
| |
| |_
|   |
|   |_
|     |
|     |_
|_______|

The sum of the to long roads are equal to the sum of all the small roads

Weighing the roads based on type means that the algorithm sees a 50% longer road if the road type is "road" and not "avenue". Then you can have a big avenue be 100% distance, medium be 110%, high density road be 150%, medium 160%, low 180% and dirt-road 200% of its actual distance. That means all cars will travel twice as far by avenue before taking a dirt road instead. As it should be.
 

Mindwipe

Member
Looks like Guillaume Pierre ‏is very engaged with people on Twitter, even shared some tech under the hood , like this one about path finding algorithm:

Guillaume Pierre ‏@MaxisGuillaume
@Le_Belge_a_dit it's using D*, not A*, but yeah, looking into some changes to the planning AI.

Many lolz at the amount of "we're investigating that" comments.

I imagine higher ups are certainly investigating how Maxis has phoned this stuff in for two years. At least the ones not smart enough to realise their own direct culpability.
 

KKRT00

Member
I don't even think the city are big or complex enough to even bring down a modern cpu.
My CPU hardly rose over the 40% usage with a 200k city and massive amount of traffic.

They could process more agents if they only calculated partial routes so take the first 5 roads edges and travel along it. Then after it is at a stopping point recalculate the next 5 road edges to travel along probably with more updated data to use. But keeping a traffic count and would hardly add any memory and processing it is just one more add to a score you need to do when calculating roads. And one more add for the system that handles the road graph.

Should make the cars also more dynamic and reallife or it would fuck things up bad.



This is probably logic that you want to run fast. Not something you want designers to fuck around with. But in this case it probably would have been better :p
BTW how was Your CPU load distribution between those four cores? Equal?

It definitely could be fixed by adding conditions, but i'm really interested how agents cpu cost scales. For now we have limited space and real population that cant be really higher than 70k, which means around 20k cars and 200k agent simultaneously if we count tourists, workers from other towns and services agents [electricity, pollution, water].

In 3x times bigger city with 3x times higher real population, amount agents will increase around 3x times, but would cpu usage too?
 

diffusionx

Gold Member
I don't even care about this game anymore. I wish EA and Maxis cared more about this franchise than they obviously do. This isn't even about what anyone wishes the game had - judged on its own merits, by its own standards, it's terrible.

I'll see what comes from it in 6-12 months. If previous EA turds are any indication, though, it won't be much.

KKRT00 said:
In 3x times bigger city with 3x times higher real population, amount agents will increase around 3x times, but would cpu usage too?

My guess is that it is roughly linear, so yes. It might even be more than that, due to increased interactions amongst agents.
 

ascii42

Member
This is true but it would negatively effect search performance, not sure if that's an issue with the game or not.

Adding road type into the calculation as was suggested wouldn't change it at all. As for my traffic suggestion, that would depend on a few factors. Basically it comes down to how you want to rate levels of traffic congestion.
 

Septimius

Junior Member
Adding road type into the calculation as was suggested wouldn't change it at all. As for my traffic suggestion, that would depend on a few factors. Basically it comes down to how you want to rate levels of traffic congestion.

You can do it even more simple. Weight the roads like I suggested, and do a random percentage-based load-balance based on road type with non-weighted values. Problem with loading off due to congestion is that you'll have the ones that would congest the same street congest other parts of your map, so that's not desirable either.
 
Really, really sad. Really disappointed by all of this. I was waiting to get this for when it released on the Mac, but shit like this would just really bother me, so I'll probably pass.
 
BTW how was Your CPU load distribution between those four cores? Equal?

It definitely could be fixed by adding conditions, but i'm really interested how agents cpu cost scales. For now we have limited space and real population that cant be really higher than 70k, which means around 20k cars and 200k agent simultaneously if we count tourists, workers from other towns and services agents [electricity, pollution, water].

In 3x times bigger city with 3x times higher real population, amount agents will increase around 3x times, but would cpu usage too?

Forgot to check on the individual cores.
I saw citizen count go up at the different marks i windowed the game and pull up taskmanager monitor it for a hour and wrote down the usage. Forgot to pull up the resource manager to see individual core loads. Maybe i will do that today. I need bulldozer my city anyway. Too much traffic jams nothing can get in or out :(.

Really, really sad. Really disappointed by all of this. I was waiting to get this for when it released on the Mac, but shit like this would just really bother me, so I'll probably pass.

For me imo it is still fun till i reach the 140k citizen mark and everything just get stuck because of stupid traffic. That takes about 3~4 hours to reach.
Sometimes i can handle cities with 200k people depending on how traffic comes into my city zone. But then again i already almost spend 50 hours into this game 25 euro well spend if you ask me.
But i wont defend them from the mistakes. And hopefully they will have corrected most of the mistakes when the mac version comes out.

They should just made the online like shooters have do it have a functional server list and let people either setup their own servers or rent them.
And the servers can pump some statistics data back to the servers at maxis every other 10 min to show on the load screens :p
 

Datschge

Member
Not sure if it was already posted in any of the many threads, still catching up, but...

Bwahahahaha

Edit: Finally caught up, was posted two times before, mea culpa. But this is my favourite thread now for all the fun videos. :lol
 
Glad I put buying this off now, sounds like it needs to go back into beta.

Yeah when this thing is finally playable could someone start a thread that says "Sim City is now fixed and playable!".

It would save me some time trying to stay up to date with this. :)
 

Jeff-DSA

Member
I've held off writing my review for the game, for several reasons. First, I still have trouble playing on the server I want to with my friends when I want, and secondly because oddities kept coming up and I wanted to make sure I could speak of them all properly.

It's about time to write, and the writing ain't going to be pretty.
 

glaurung

Member
I've held off writing my review for the game, for several reasons. First, I still have trouble playing on the server I want to with my friends when I want, and secondly because oddities kept coming up and I wanted to make sure I could speak of them all properly.

It's about time to write, and the writing ain't going to be pretty.
You go girl.
 
I've held off writing my review for the game, for several reasons. First, I still have trouble playing on the server I want to with my friends when I want, and secondly because oddities kept coming up and I wanted to make sure I could speak of them all properly.

It's about time to write, and the writing ain't going to be pretty.

Just tear them a new one.
Their servers are really shit.
And they have to know it.
 

Jeff-DSA

Member
You go girl.

*snap snap*

I'm not going to just crap on it, but I do think that these issues that were TOTALLY IGNORED in early reviews are something that people should know about. Yeah, they might get patched down the line, but that's not the state of the game right now.
 
*snap snap*

I'm not going to just crap on it, but I do think that these issues that were TOTALLY IGNORED in early reviews are something that people should know about. Yeah, they might get patched down the line, but that's not the state of the game right now.

That is not something game development should go into.
They should release a good game and patch up minor bugs or delay it.

I mean i can't even play right now one of the villages i was building or start a new one...
And the shitty server list really something. It does makes you wonder.
 

drizzle

Axel Hertz
Not sure if it was already posted in any of the many threads, still catching up, but...

Bwahahahaha

Edit: Finally caught up, was posted two times before, mea culpa. But this is my favourite thread now for all the fun videos. :lol

I don't see anything wrong with this?

People commute outside your city for commercial and industry if they can't find places to buy stuff or places to work on your city.

Also, everything you plop down (school, public transport, factories, hospitals, police and fire departments) all create jobs, so you have a couple jobs on your city, just not enough.

It just doesn't work because you'd have to keep taxes up, and people would be bitchy about high taxes, no commercial and no industrial. Also, your city wouldn't have an income - that's why he's playing in Sandbox mode, which gives you infinite money.

However, if he plopped down a recycling plant, used the recycled materials to make alloys/microchips/TVs, income wouldn't be a problem anymore and you'd have a functioning city. I almost did that on my earlier city: I only had 3 blocks of industrial zone and not enough commercial for a long time.
 
I don't see anything wrong with this?

People commute outside your city for commercial and industry if they can't find places to buy stuff or places to work on your city.

Also, everything you plop down (school, public transport, factories, hospitals, police and fire departments) all create jobs, so you have a couple jobs on your city, just not enough.

It just doesn't work because you'd have to keep taxes up, and people would be bitchy about high taxes, no commercial and no industrial. Also, your city wouldn't have an income - that's why he's playing in Sandbox mode, which gives you infinite money.

However, if he plopped down a recycling plant, used the recycled materials to make alloys/microchips/TVs, income wouldn't be a problem anymore and you'd have a functioning city. I almost did that on my earlier city: I only had 3 blocks of industrial zone and not enough commercial for a long time.

That was on a city with no other neighbours in the region, so they couldn't commute. The game is broken in that people don't even look for jobs (they don't leave the house) if taxes are low enough and you put enough parks and theatres around them.
 

Bitmap Frogs

Mr. Community
I'm glad I passed on this.

Always online DLC bait.

Another historical franchise ruined by EA... These guys are sitting on a pile of beloved IP they have relentlessly murdered.
 
I don't even think the city are big or complex enough to even bring down a modern cpu.
My CPU hardly rose over the 40% usage with a 200k city and massive amount of traffic.

What speed are you playing on? Jeff Gerstmann mentioned that it got a bit framey for him on the highest speed setting, and I think he was using a pretty recent i7.

If it simulates everything the same way on each speed, doubling the speed might double CPU usage.
 
What speed are you playing on? Jeff Gerstmann mentioned that it got a bit framey for him on the highest speed setting, and I think he was using a pretty recent i7.

If it simulates everything the same way on each speed, doubling the speed might double CPU usage.

Speed 3 all the times.
 

Kabouter

Member
What speed are you playing on? Jeff Gerstmann mentioned that it got a bit framey for him on the highest speed setting, and I think he was using a pretty recent i7.

If it simulates everything the same way on each speed, doubling the speed might double CPU usage.

That's surprising to me, because my ancient Core 2 Duo still delivers solid performance at Llama speed (which is the max now) even in cities of nearly 200k. Certainly not framey. How much faster is cheetah anyway?
 
That's surprising to me, because my ancient Core 2 Duo still delivers solid performance at Llama speed (which is the max now) even in cities of nearly 200k. Certainly not framey. How much faster is cheetah anyway?

Huh, maybe he had something else going on then. I assumed he was CPU-limited because he mentioned that playing around with graphical settings didn't make a difference. I think this was in their quick look.
 

Zabka

Member
Huh, maybe he had something else going on then. I assumed he was CPU-limited because he mentioned that playing around with graphical settings didn't make a difference. I think this was in their quick look.

Jeff said that before the top speed was limited.
 

IISANDERII

Member
eWmW1XK.jpg
So if I build in a different way that doesn't have this type of plan, then am I hamstringing the potential of my city town?
 

Rentahamster

Rodent Whores
So if I build in a different way that doesn't have this type of plan, then am I hamstringing the potential of my city town?

No, not necessarily. The "end game", so to speak, isn't necessarily getting the largest population in the game. That is only one goal, out of several possible ones.
 

Nirolak

Mrgrgr
Okay here's the new thread about traffic improvements/mod support: http://www.neogaf.com/forum/showthread.php?t=524202

A peak at the traffic changes coming in a patch: http://t.co/ZWiXjRwJML

FYI: The dev: https://twitter.com/MaxisGuillaume often asks people to send him their Origin ID if they have a really good example of a bug in their city, especially if it's a tricky one to reproduce. If you some craziness going on in your game send it their way.

JackDT said:
The Maxis Devs seem gung ho on modding which I'm so happy to hear. How fun would it be to make your own agent types?

https://twitter.com/moskow23/status/312272085894455296

Yup, our UI is in javascript for a reason, so you can play with it.

https://twitter.com/vertexnormal/status/312275013380210689

It's cool to see the fans digging through our source files, the creativity of our mod community has always been the lifeblood of Maxis.

Whats with this?

[–]N4N4KI 219 points 15 hours ago*
For Posterity
Ocean Quigley confirming via twitter that modding .package files is allowed:
https://twitter.com/oceanquigley/status/299566347438936064
and of course the screencap for when it gets deleted:
http://i.imgur.com/CvlEwTx.jpg
Edit: #UNCONFIRMED# according to /u/mgmuscari
Most recent patch (that I just downloaded) made the package files read only (lol), and editing DEBUG=!1 to be DEBUG=!0 didn't do anything for me.
But why was this done? Quiggers said that you could 'go for it' in relation to modded .package files ...
MAXIS = more lies.
 
I was pretty excited for this game and had it pre-ordered, but then fate stepped in. The UPS tracking had said the package was delivered at my front door, but nothing was there. I waited an extra day and still nothing. After two days, at which point it was becoming apparent that these servers were clusterfucked and that I was never going to receive my package, I contacted Amazon and asked for a refund. Amazon being their usual awesome self did so no questions asked.

For an added bonus I still got the $20 credit for the pre-order too.

Bullet dodged.

Alright, I have a moral dilemma, GAF. My UPS package finally showed up - 9 days late. They've already refunded me for the missing package, but now I have it in my hands. Do I appease the karma gods by letting Amazon know and send it back, or do I fall into temptation and sleep with the EA devil for free?
 
Top Bottom