Setup & Run
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.2
export PATH="$PATH:$(go env GOPATH)/bin"
In Terminal #1:
go run server/main.go -p <port>
In Terminal #2:
go run client/main.go -f <filename> -l <host>:<port>
Configuration of a Strategy
{
"prob": < success probability >,
"wage": < initial wage >,
"stepFunc": < wage increasing strategy >,
"stopLoss": < upper loss bound >,
"winRound": < calculate until k-th round >,
"meanShift": < expected winning probability of house [0 = perfectly fair, 1 = house always wins] >
}
Stake Strategy
Start
Explanation: The game starts with an initial stake
Step
Explanation: Define a strategy for increasing the stakes, which considers two factors at hand:
- Recovery of Failed Bets: The overall outcome after losing in
$X_1, …, X_{n-1}$ and winning in$X_n$ . - Final Potential Damage: The overall loss expected after losing in all
$X_1, …, X_n$ .
Options:
- 'two' (Power of Two): After each losing, the stake is doubled.
$f(k) = 2^k$ - 'fib' (Fibonacci): After losing k-1 bets, the stake is equal to the k-th Fibonacci number.
$f(k) = fib(k)$ .
Default: 'two'
Controls: Financial Stability
Stop
Explanation: Under what circumstances the game should be stopped.
Options:
- 'stopLoss': If at least
$N$ was lost ( = bankruptcy), stop the current increasing strategy.
Simultaneous Games
Explanation: If
Critique:
On the one hand: The more games are played simultaneously, the more likely the expected outcome is negative, so the number of games should not be very high.
On the other hand: Rare events can affect the whole system, if the number of games are very low, so the number of games should not be very low.
Controls: Stability of Results
Success Probability [EXAMPLES]
Explanation: How high the probability of success is for each round.
Options:
- 'xl-risky':
$p = 0.1$ - 'l-risky':
$p = 0.2$ - 'm-risky':
$p = 0.3$ - 's-risky':
$p = 0.4$ - 'fair':
$p = 0.5$ - 's-safe':
$p = 0.6$ - 'm-safe':
$p = 0.7$ - 'l-safe':
$p = 0.8$ - 'xl-safe':
$p = 0.9$
Default: 'fair'
Controls: Winning probability
Dependence on Prior Results [IT DOESN'T MATTER]
Explanation: Given
Options:
- 'corr' (Correlation): Choose
$X_n$ the same as before - 'regr' (Regression to the Mean): Pick the opposite for
$X_n$
Default: 'regr'
Disclaim: Both assumptions are false. There is no proven hidden connection between a current event and events occurred previously. But one of the both assumptions appear to be more reliable in various cases.
Controls: Playing strategy