Started by z, August 02, 2008, 05:07:50 PM
0 Members and 1 Guest are viewing this topic.
QuoteIn addition... they improve your city in myriad other ways (enhancing desirability, boosting EQ or HQ, further increasing Mayor Rating, to name a few).
Quote from: z on December 06, 2009, 01:30:15 AMI stop the game, find the local Sims going to local jobs, and in the middle of the night, I bulldoze their residences. (Caught them Sims napping! ) Now there are no workers at those far-flung jobs. What happens now? Here's the answer:Look at the point where the population takes a little plunge. The job count doesn't even budge. That's just what you would hope. The Sims passing through town now see open jobs here, and take them instead of continuing to the next tile. That's the only place those workers can be coming from.
Quote from: RippleJet on December 06, 2009, 02:12:17 AMHowever the RCI graphs only show the capacities.They do not show the population or number of workers.
Quote from: wouanagaine on December 07, 2009, 01:27:08 AMspeaking of PH, please take a look at this
Quote from: wouanagaine on October 17, 2007, 12:15:09 AMSeems you've been to Amit Patel webpage
QuoteThe infinite capacity of SC4 networks also explains why Simulator Z Classic (which has the capacity levels of the original Maxis simulator) can be used on a city of any size without causing abandonment due to commute time.
Quote from: z on December 07, 2009, 02:37:15 AMAh yes, Amit Patel's Web site! This is where I learned basically all I know about A*. Was there something in specific that you wanted me to look at here?It's funny how things go full circle. The way I first found that place was with a post that started with the following, addressed to Mott:
h(n) = ph * d(n,dest)
Quote from: wouanagaine on December 07, 2009, 07:48:46 AMif ph < 1 then h(n)/ph > h(n) which results in an overestimate which is the only way to find the best path ( one of the hypothesis of A* )
Quote- At one extreme, if h(n) is 0, then only g(n) plays a role, and A* turns into Dijkstra's algorithm, which is guaranteed to find a shortest path.- If h(n) is always lower than (or equal to) the cost of moving from n to the goal, then A* is guaranteed to find a shortest path. The lower h(n) is, the more node A* expands, making it slower.- If h(n) is exactly equal to the cost of moving from n to the goal, then A* will only follow the best path and never expand anything else, making it very fast. Although you can't make this happen in all cases, you can make it exact in some special cases. It's nice to know that given perfect information, A* will behave perfectly.- If h(n) is sometimes greater than the cost of moving from n to the goal, then A* is not guaranteed to find a shortest path, but it can run faster.- At the other extreme, if h(n) is very high relative to g(n), then only h(n) plays a role, and A* turns into BFS.
Quote from: daeley on December 07, 2009, 08:28:43 AMquick comment: As I understood from below quote from Amit Patels site, a higher h(n) (or lower ph in case of h(n)/ph) would cause less exploration while a lower h(n) (which could be generated by increasing ph in h(n)/ph) increases exploration and makes the search more like a dijkstra algorithm. This seems to contradict your quote?or do I mix different concepts here?very confusing, all of this...
Quote from: RippleJet on December 07, 2009, 06:23:14 AMRegarding the naming of property 0x4a678060...
Quote from: daeley on December 07, 2009, 07:23:33 AMregarding the value of PH, do we have any idea where this is used in the calculation of SC4's A* algorithm?
Quotethe reason I'm asking is that it's obviously a fraction or a multiplier to some parameter in A*'s calculations. Considering the same definitions on Amit Patel's site of f(n) = g(n) + h(n) where h(n) is related to the estimate of distance to the goal, I would think that the "nearest destination attractiveness" is a multiplier to this distance which would probably mean that h(n) is defined somewhat along the lines of Code Select Expandh(n) = ph * d(n,dest) where d(n,dest) is a distance measure (euclidian or manhattan, but I'd guess manhattan as this avoids calculating a root) between square n and the destination square.
QuoteIf this is true - and from what I read this seems to be implied, but I haven't seen anyone specify it so explicitly - you would need to guess the scale of both g(n) and dist(x,y) to correctly find the "true" value for perfect pathfinding. If g(n) is scaled in time (distance/speed) and dist(x,y) is scaled in distance, according to the same distance scale used to calculate g(n), then it makes sense to calculate ph as 1/speed (as mott concluded?). If in this formula speed is the highest achievable speed, then pathfinding should be "perfect". If speed is lower, the A* algorithm may produce routes that are sub-optimal: shorter in distance, but longer in travel time since a sub-optimal travel strategy is used.Again, following the same reasoning, if ph is much too high (i.e. 0.09, which equals a speed of 11, units not specified) the simulator will show a strong preference for routes that follow the shortest-distance route. In other words, such a simulator does actually work, but you will need to build your road system in such a way to take this into account and you should, for example, avoid building low-capacity links on a direct path between residential zones and jobs.Is this a correct synthesis of all the "discoveries" regarding the PH value?
QuoteIf so, a higher-than-perfect behaviour does not strike me as awefully unrealistic for a pathfinder, as in real life people will often pick the shortest route, even if it's not the best.
Quote from: wouanagaine on December 07, 2009, 11:40:57 AMBTW Did someone already test with PH = 0 and PH = 1 ?
Page created in 0.190 seconds with 33 queries.