Re: Trading problem?

Rich Skrenta (skrenta@pbm.com)
Wed, 12 Nov 1997 08:33:05 -0800 (PST)

> I believe the random number generator is universal for all
> factions attempting to find market for a tradegood and not localized to the
> faction attempting to establish the market at hand. In other words for
> someone else to succeed, someone else must fail.

Actually, the 50% trade check for whether a city will buy a given
tradegood does not use the random number generator at all.
For a given tradegood, approximately half of the cities on the map
will buy it, and half won't. This is set when the tradegood comes
into existence, and is not affected by who is looking for a buyer
city, when they do it, etc.

(The implementation is stateless, it is basically

if ((HASH(sell-city | potential-buy-city | item | secret) & 1) == 0)
city will buy the tradegood
else
city will not buy the tradegood

where MD5 is used for the hash.
)

Main Index  |  Olympia  |  Arena  |  PBM FAQ  |  Links