extGame: Zero-sum game

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Simulates a zero-sum game between two competitors with a fixed amount of resource.

Usage

1
extGame(bet = 1, total = 100, tmax = 2)

Arguments

bet

bet size of each competitor on each time.

total

total amount of resource.

tmax

maximum game time.

Details

A zero-sum game is a mathematical representation of a situation in which a participant's gain (or loss) of resource is exactly balanced by the losses (or gains) of the resource of the other participant(s). If the total gains of the participants are added up, and the total losses are subtracted, they will sum to zero.

Value

'extGame' returns a graphic with the amount of resource of each competitor on each time.

'extGame' also returns an invisible vector with the results of the loser on each time.

Author(s)

Alexandre Adalardo de Oliveira and Paulo Inacio Prado ecovirtualpackage@gmail.com

References

http://en.wikipedia.org/wiki/Zero-sum_game

See Also

simHub, randWalk, http://ecovirtual.ib.usp.br

Examples

1
2
3
4
5
## Not run: 
extGame(bet=1,total=20)
extGame(bet=1,total=100)

## End(Not run)

ecovirt/EcoVirtual documentation built on May 15, 2019, 10:07 p.m.