Home > Software engineering >  Recursive structure in dynamic programming
Recursive structure in dynamic programming

Time:07-29

The Trust Game on n rounds is a two-player dynamic game. Here, Player I starts with $100. The game proceeds as follows.

• Round 1: Player I takes a fraction of the $100 (which could be nothing) to give to Player II. The money Player I gives to Player II is multiplied by 1.5 before Player II receives it. (So for example, if Player I gives $20 to Player II, then Player II receives $30 and Player I is left with $80).

• Round 2: Player II can choose a fraction of the money they received to offer to Player I. The money offered to Player I increases by a multiple of 1.5 before Player I receives it.

More generally, at round i, the Player at the current round (Player I if i is odd, and Player II if i is even) takes a fraction of the money in the pile to send to the other Player and keeps the rest. That money increases by a factor of 1.5 before the other player receives it. The game terminates if the current player does not send any money to the other player, or if round n is reached. At round n, the money in the pile is split evenly between the two players.

Each individual player wishes to maximize the total amount of money they receive.

Can anyone help me in finding the recursive structure/component in this problem?

CodePudding user response:

Let us assume player-1 has $M and player-2 has $N and now it is the turn of player-1. M and N are non-negative numbers assuming maximum amount any player can give at his turn is the present amount of money with them.
If M = (x y) with x ≥ 0 and y ≥ 0 and player-1 decides to give x amount to player-2, then combined amount with players is M N 0.5x and this amount is maximized if x = M.

Assuming perfect trust b/w persons, each player maximizes money they receive at step-N if the combined amount b/w them is maximized. So the best strategy would for each player is to give all their money to the other in order to maximize total amount at each step.
At round-(k 1) (k≥0), total amount b/w the players is ((1.5)^k) * 100

Some practical application may include having 100l of water with you. In a nearby shop-A, 1l of water is exchanged with 1.5l of petrol. In a nearby shop-B, 1l of petrol is exchanged with 1.5l of water. In a nearby shop-C, each litre of water/petrol is bought for $1. What is maximum money you can get if you can make a total of (N 1) trips ignore any transportation costs.

  • Related