Archived from groups: alt.games.vgaplanets4 (

More info?)

Step 0

Leave the current system of crime effects and sell limitations. Cut the

prices to integers.

Step I

Introduce rules which lead to real demands on buying, holding and consuming

CB.

Examples are given in the last thread (i.e. add on features and/or making

hostile sells more effectiv)

Step II

Implement a bounded double auction system. That means here limited buy and

sell orders can be given. A sell order with limit zero stands for an

unlimited sell order and a buy with a sufficient high value for an

unlimited. Set an upper bound of 1000 for the posibble price and limits.

Price building is performed with following rules:

(i) Principle of price at highest trading volume

Calculate the price for each type at which the highest sum of kT can change

owner ship (often in real life systems the highest order volume is taken but

then abuse with extreme limits are possible when the order limits become the

equilibrium price itself). This price is called equilibrium price (EP)

(ii) Principle of continuity

If there are more than one possible EP then the price closest to the last

turn price is taken. This can be extended in a way that EPs are considered

as equal if they are separeted by a percentage gap smaller than for example

1%

(iii) Principle of execution order

At first all buy orders higher limited than the EP and all sell orders lower

limited than the EP are executed.

At second all orders limited exactly to the EP are executed as possible.

Step III

Add virtual agents (VAs) which give limited buy and sell orders to stabilize

the market, add a random behavior and ensure sufficient liquidity.

The the orders of the VAs follow these rules:

(i)

The total amount of kT per type per turn is equal to the rounded value of

1/12 * AllColonists except Borg / 1000. Call it TA (of course one can choose

othe values for TA to control the liquidity)

(ii)

The orders of the VAs are generated as follows:

Take the last price and call it LP. Take the current mean price without the random factor, call it MP.

Let the dice decide if the agents shall give their orders arround LP or some suited function of

LP and MP, for example SQR(LP*MP) or [(LP^0.5+MP^0.5)/2]^0.5

Now create randomly 100 buy and 100 sell oders each of volume of TA:

Randomize

For i=1 To 100

abuys(i,1)=AMP* (1+(0.5-RND))

abuys(i,2)=RND

abuys=buys+buys(i,2)

asells(i,1)=AMP*(1+(0.5-RND))

' Here the agents set limits in a +-50% range. This of course can be tuned

down to control the volatility. And also

' other statistics then uniform distribution are thinkable.

asells(i,2)=RND

asells=asells+asells(i,2)

Next i

For i=1 To 100

abuys(i,2)=abuys(i,2)/buys*TA

asells(i,2)=asells(i,2)/sells*TA

' This was for renormalizing the agent's order volumes to TA

next i

sells(i,1), buys(i,1) contains the limits and sells(i,2), buys(i,2) the

amounts

Step IV

Now put the agent's and the player's orders together, calculate the EP and

execute the orders:

Assume all player's and agent's orders now are in the fields buys(1 To N,1

To 2) sells(1 To M,1 To 2)

EP=0

Volume=0

For EPTest=0 to 1000

For i=1 to N

sells=sells+IIF(sells(i,1)<=EP,sells(i,2),0)

next i

for i=1 to M

buys=buys+IIF(buys(i,1)>=EP,buys(i,2),0)

next i

If Min(sells,buys)>Volume then

Volume=Min(sells,buys)

EP=EPTest

end if

Next EPTest

Volumebuy=Volume

Volumesell=Volume

So we have the new price EP.

Now host uses the field where the base adresses for the bases with given

orders are stored and randomly browses thru the bases, checks if the set

limits fit to EP. If yes then the order is executed and

Volumebuy=Volumebuy-buy and Volumesell=Volumesell-sell until both are zero.

So what is needed is

(a) Adding limit input fields to the client maybe with a spin button that

stops at zero and 1000 to the cb overview screen. An additional button which indicates wether unexecuted orders should be used

for next turns or would be meaningful.

(b) Adding twelve limits to the base object

(c) Remember the bases which gave sells and buys and store the amounts into

a field ( for example: playerbuyorders(limit: 1 To 1000)=sum of all buy

orders at limit index.) and remember the lowest and highest limit for

avoiding to unneccesary work.

(d) Do the agent routines and the double auction subs and execute the orders

and clear orders which were not to executed generate the base log entries.

(e) Add features for demands on CB:

Illegal books - gc tax=gc tax * (1+ 0.3* Min(1;amount*1000/colonists)) but

not for UA and 1M col use up 50 kT

VR-6x Holochips - starting expirience of ships= +

Min(100;amount/(10*SQR(crew+mass))) but not for Priv and the exp gain amount

for each ship uses up the same amount of cb

Stim-Bright Pills - increases native (up to 4% total) and colonists (up to

7,5% total) growth - 1M col/nat use up 50 kT

Grecken Blood Wine - makes bovinoids and avians drunken and gives them a

supply/mc boost *(1+ 0.3* Min(1;amount*1000/nat)) 1M nat use up 50 kT -

Emotion Chips - let bots and borgs works in camp and mines - 100k use up 50

kT - not for EE

Handguns - increases ground combat combat - * (1+ 0.3*

Min(1;100*amount/troops)) only troops - not for Liz

Illegal Music CDs - increases happiness of colonists and natives

+10*Min(1;amount*1000/pop) - 1M pop use up 50 kT

Kerria Crystal Artifacts - gathering gipsodal, bot hg training

Lerchin Spices - gathering amorhpous, used up by Lizard for growth:

Lizards consume Lirchin Spieces at the rate of 1 unit of Spieces

per 10K colonists. This results in 5X growth rate for the affected

persons but no taxes produced. Each unit of spiece eaten also reduces

city tax income by 10%, up to 10 units resulting in no city tax income.

Alpha Wave Floggers - increases the starting skill of ships -+

Min(100;amount/(10*SQR(crew+mass))) but not for Priv and the exp gain amount

for each ship uses up the same amount of cb

Vaggen War Hounds - reduces labour camp rioting, fighting against cups,bugs

and amorphous and crime - with a chance of 50%*Min(1;100*amount/prisoner)

any rioting is supressed. -100*Min(1;amount/crime) crime and the reduction

is used up as cb, amount*500 prevent chups,bugs and amorphs from doing nasty

things, 100k nat use up 50 kT

Repterrian Psi - Geese - gathering reptilians and increase their mining

rate - + 50%*Min(1;amount*1000/nat) joining chance and rate and mining

rate - 100k nat use up 50 kT - not for Rebel

GFM GToeroe