You must be logged in to post messages.
Please login or register

Pharaoh: Game Help
Moderated by VitruviusAIA, Gweilo

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: Where will a non-dock cart pusher go?
posted 04-04-13 10:12 ET (US)   
In this thread I assume that only a single non-docker cart pusher is delivering or getting and that all buildings are fully staffed, have room for goods being delivered, and (unless noted) are connected.

A Caesar III cart pusher that is delivering to a warehouse will usually deliver to the closest warehouse, but sometimes he will not. (He will always deliver to a nearby warehouse if any other warehouse is much farther away.) This occasionally caused me problems until I read about Trium's work in Cartpushers, traders, etc. - which building is nearest?, with the correct algorithms in replies #4 and #5.

Pharaoh delivering cart pushers are (in my opinion) less troublesome in choosing a building. Their behavior is described in my first reply.

Pharaoh getting cart pushers can sometimes go to a building that is not the closest, as described by Plebus in reply #26 of 3 new speed record and 3 new blocks and Desmondius in SY Getting Preferences. (A few of my cities have granaries that send cart pushers to get food from storage yards that are far apart, and I was lucky that they always took food from the storage yard(s) I intended.) I found that Pharaoh getting cart pushers use an algorithm that is similar to the one described by Trium. Their behavior is described in my second reply.
Replies:
posted 04-04-13 10:16 ET (US)     1 / 16  
If a Pharaoh cart pusher can deliver a good to a building that is not a storage yard or granary, he will deliver to the one that has the least amount of his good. If only storage yards and granaries are available, a granary or storage yard that is emptying (or a storage yard that would like to deliver game meat to a zoo but cannot because a hunting lodge is already delivering to the zoo) will send its cart pusher to a granary and a producer (or a getting granary or storage yard that is delivering the remainder of his load after he couldn't deliver all of it) will send its cart pusher to a storage yard. If those rules select multiple buildings then the cart pusher will deliver to the nearest one by road, and if there are multiple buildings at the same distance then I don't know which one is selected.

The above rules were tested with many (but certainly not all) combinations of delivery and receiving buildings. Except for a few cases, I did not test a getting cart pusher that was delivering the remainder of his load (after he got a good and could not deliver all of it to his granary or storage yard), but I expect that he would behave the same.

If a cart pusher doesn't deliver his entire load, it appears that he then chooses another building from his current location. (I didn't test this very much, but it makes sense.)

FarmBrickmakerBrickmakerBrickmakerStorage Yard

In this example, the two breweries on the left each have 100 barley and other brewery has 8 barley. If the farm harvests 400 barley, its cart pusher will deliver first to the brewery on the right (since it has the smallest barley stock), then to the brewery in the middle (since it is the closest by road to his current location of the 2 breweries with 100 barley), then to the brewery on the left, then to the storage yard.

[Added the phrases "(or a storage yard that would like to deliver game meat to a zoo but cannot because a hunting lodge is already delivering to the zoo)" and "(or a getting granary or storage yard that is delivering the remainder of his load after he couldn't deliver all of it)" and "Except for a few cases,".]

[This message has been edited by Brugle (edited 04-05-2013 @ 02:07 AM).]

posted 04-04-13 10:23 ET (US)     2 / 16  
Note: getting granaries are more complicated than I thought. I didn't try to determine exactly how they work--the amount of food in a granary may be a factor.

Note: Narf determined that Caesar III warehouse getting cart pushers are affected by quantity, and this may apply to Pharaoh getting cart pushers.

To calculate the building where a Pharaoh getting cart pusher will go, a key factor (discovered by Trium) is the building's "access point". The access point is the first road tile adjacent to the side of a building encountered when circling the building clockwise starting at the north tile. It may be roadblocked. A getting cart pusher goes from the access point of one building to the access point of another.

For each building, the "access distance" is the shortest distance from the map entry point to its access point while sticking to the NE-SW and NW-SE axes and staying on passable tiles.

The "getting distance" from one building to another is the sum of two terms. One term is the absolute value of the difference between the access distances of the two buildings. The other term is the normal as-the-crow-flies distance between the north tiles of the two buildings, counting tiles horizontally, vertically, or diagonally. When selecting from a group of buildings, a getting cart pusher goes to the building with the lowest getting distance. If multiple buildings have the same getting distance, I don't know which one is selected.

A storage yard getting cart pusher selects a building from all connected and unconnected granaries and storage yards that have the good that he wants and are not set to get that good. If the building selected is an unconnected storage yard, the cart pusher goes off-road. If the building selected is an unconnected granary, the cart pusher disappears almost immediately.

A granary getting cart pusher selects a granary from all connected granaries that have the good that he wants and are not set to get that good, but does not necessary choose the one with the lowest getting distance. If there is no such granary, he may follow the same procedure as a storage yard getting cart pusher, but if the building selected is unconnected, the cart pusher disappears almost immediately.

If a getting cart pusher arrives at his destination and finds that the good he is getting is no longer in the destination building, he receives a new assignment as if he was starting at his building. (His current location is irrelevant.)

Granary
Storage YardStorage Yard
GranaryStorage YardStorage Yard

In this example, north is up-left. The isolated road tile on the bottom right is the map entry point. All granaries and storage yards contain 400 game meat. The south storage yard (the right one on the bottom) will get game meat. In the table, (a) is the access distance of the building, (b) is the absolute value of the difference between (a) and the access distance of the south storage yard (11), (c) is the normal as-the-crow-flies distance from the north tile of the building to the north tile of the south storage yard, and (d) is the sum of (b) and (c) (the getting distance):

(a) (b) (c) (d)
north storage yard 17 6 6 12
northeast granary 13 2 7 9
east storage yard 10 1 6 7
west granary 18 7 7 14
southwest storage yard 14 3 3 6

If the south storage yard is set to Get 1/4 game meat, then (after it gets 400 game meat) to Get 1/2 game meat, then (after it gets another 800 game meat) to Get 3/4 game meat, its cart pusher will get game meat from the southwest storage yard, east storage yard, northeast granary, north storage yard, and west granary. Instead, if the plaza is first deleted (so that the longer roads are disconnected) and the same procedure is followed, its cart pusher will get game meat from the southwest storage yard, east storage yard (going off-road), and repeatedly appear and disappear since he is not connected to the northeast granary.

If the south storage yard is replaced by a granary with its north tile in the same position, its access distance will be the same (11). If the same procedure is followed, its cart pusher will get game meat from the northeast granary, west granary, southwest storage yard, east storage yard, and north storage yard. Instead, if the plaza is first deleted (so that the longer roads are disconnected) and the same procedure is followed, its cart pusher will get game meat from the west granary, southwest storage yard, and repeatedly appear and disappear since he is not connected to the northeast granary.

[Changed "counterclockwise" to "clockwise".]
[Added "Note: getting granaries are more complicated than I thought. I didn't try to determine exactly how they work--the amount of food in a granary may be a factor.", added ", but does not necessary choose the one with the lowest getting distance", and changed "he follows" to "he may follow".]
[Added "Note: Narf determined that Caesar III warehouse getting cart pushers are affected by quantity, and this may apply to Pharaoh getting cart pushers."]

[This message has been edited by Brugle (edited 05-28-2023 @ 07:44 AM).]

posted 04-04-13 13:26 ET (US)     3 / 16  
The access point is the first road tile adjacent to the side of a building encountered when circling the building counterclockwise starting at the north tile.
Small slip - I believe you mean clockwise
posted 04-04-13 13:50 ET (US)     4 / 16  
Trium,
I vaguely remember making a similar mistake years ago.
posted 04-05-13 00:03 ET (US)     5 / 16  
ok, I'll throw in my 2 debens

been having trouble with VSY's taking game meat back across town to the storage yard they got it from instead of dropping it in the granary across the street

so, I tested

a storage yard with 800 (imported) game meat, a storage yard across the street with room (set to accept), and a granary about 12 tiles away

set the storage yard with game meat to empty, and to my surprise, he took it down the street to the granary, ignoring the SY across the street

appears there is a difference between "getting" and "emptying"

Quote (Puk, Breton God of Mischief):

"What fools these mortals be"

ROFL...must have been watching me play Pharaoh
posted 04-05-13 02:10 ET (US)     6 / 16  
been having trouble with VSY's taking game meat back across town to the storage yard they got it from instead of dropping it in the granary across the street
That's because you're not using a VSY. By definition, a VSY is not connected to the storage yard that it gets from. (A granary can get from a connected storage yard without a VSY.)
set the storage yard with game meat to empty, and to my surprise, he took it down the street to the granary, ignoring the SY across the street
Which is what I said would happen:
a granary or storage yard that is emptying will send its cart pusher to a granary
been having trouble with VSY's taking game meat back across town to the storage yard they got it from instead of dropping it in the granary across the street
I didn't cover that situation, since all I said was that he would "behave the same" and I didn't previously cover deliveries of game meat.

I investigated a getting granary or storage yard cart pusher that couldn't deliver all of his food, and found that it preferred to deliver the rest to a storage yard instead of a granary. I also investigated a storage yard that starts delivering game meat (because a zoo needs some) but cannot (because a hunting lodge is already delivering to the zoo), and found that it preferred to deliver to a granary. I added these two cases to reply #1.
posted 04-05-13 08:52 ET (US)     7 / 16  
Thank you, Brugle

Don't know if I'll ever understand cart pushers, but with your help, I'm learning


Quote (Puk, Breton God of Mischief):

"What fools these mortals be"

ROFL...must have been watching me play Pharaoh
posted 04-12-13 19:18 ET (US)     8 / 16  
Duh -- what's a VSY? (Specifically, what does the V stand for?)

Also, if the "access point" is a roadblocked road, does that mean it's still used for calculating distances, even though the ACTUAL ingress and egress point is the first road tile that touches the building clockwise from the north, yada yada?

Henipatra

[This message has been edited by Henipatra (edited 04-12-2013 @ 07:21 PM).]

posted 04-12-13 20:10 ET (US)     9 / 16  
what's a VSY? (Specifically, what does the V stand for?)
V stands for Vaia, as described in Vaia’s Storage Yard.
if the "access point" is a roadblocked road, does that mean it's still used for calculating distances, even though the ACTUAL ingress and egress point is the first road tile that touches the building clockwise from the north
The access point, whether it is roadblocked or not, is the actual ingress and egress point for getting cart pushers. It may not be the ingress or egress point for other things (such as citizens and bazaar buyers).
posted 04-14-13 02:16 ET (US)     10 / 16  
Thanqueue, Brugle.

Henipatra
posted 05-28-13 03:24 ET (US)     11 / 16  
Hi Brugle (and anyone else who can help ),

Has anyone worked out the cart-pusher entry/exit points for manufacturing buildings?

I've just noticed that my papyrus makers are accepting reeds from one (roadblocked) tile and exiting with papyrus from a different tile.

The layout is either :













Papyrus MakerPapyrus Maker
Storage Yard
Legend

or :













Storage Yard
Papyrus Maker
Papyrus Maker
Papyrus Maker
Legend

Gardens are reed gatherers in case the glyph doesn't work. In both cases the reeds go in one side of the papyrus maker and come out the other side as papyrus.

I've tested it with potters, brickworks & papyrus makers & it even happens if the blocks are disconnected.

It appears that the ingress point can be roadblocked, but the egress point can't, so it goes to the next clockwise tile.

But it only seems to work for manufacturing buildings - storage yard cart-pushers will happily walk through adjacent roadblocks on their way out.

I can't find any threads about it, so just wondering if anyone has outlined how it works before I go reinventing any wheels
posted 05-28-13 12:44 ET (US)     12 / 16  
Has anyone worked out the cart-pusher entry/exit points for manufacturing buildings?
I worked some of it out a long time ago, and I suspect some other players have as well.

I didn't document the entry/exit points specifically (since they are so easy to test), but I did refer to them in a few places. For example, in Immortal Iunet Inequality, reply #8 mentions that the jeweler cart pusher will leave on a different square than where gems are delivered, and reply #18 mentions that the starting point for a teacher (from the school on the N land mass) is on a different square than where papyrus is delivered. I've used roadblocks to reduce the delivery distance for beer to a senet house in my Sawu and for linen to a mortuary in my Iken.
it even happens if the blocks are disconnected.
Not always. If multiple unconnected roads touch a building where goods are delivered, the delivery point will be on the longest of the roads.
it only seems to work for manufacturing buildings
No, it also works for schools, libraries, mortuaries, senet houses, and zoos.
posted 05-28-13 15:02 ET (US)     13 / 16  
Thanks Brugle!

I was thinking specifically of cart-pushers but good to know that it also applies to school/library/etc walkers
posted 05-28-13 15:38 ET (US)     14 / 16  
I was thinking specifically of cart-pushers but good to know that it also applies to school/library/etc walkers
I don't know what you mean by "it", but I was talking only about cart pushers delivering through roadblocks. Teachers/librarians/etc do not emerge through roadblocks.
posted 02-25-22 12:42 ET (US)     15 / 16  
After many years, I realized that getting granaries did not behave as I thought, so I edited reply #2.
posted 05-28-23 07:48 ET (US)     16 / 16  
Alerted by Narf in a C3 Downloads comment, Pharaoh getting cart pushers may not behave as I thought, so I edited reply #2.
Caesar IV Heaven » Forums » Pharaoh: Game Help » Where will a non-dock cart pusher go?
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Caesar IV Heaven | HeavenGames