Skip to content

Commit 72ed507

Browse files
committed
edit 2048 code
1 parent df3d739 commit 72ed507

File tree

9 files changed

+581
-59
lines changed

9 files changed

+581
-59
lines changed

docs/src/index.md

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,46 @@
22
*A Julia interface to access decision models which appeared in Algorithms for Decision Making.*
33

44
## Problem Summary
5+
The following table contains the information about each of the problems contained in this package.
6+
7+
| Name | ``\mathcal{I}`` | ``\mathcal{S}`` | ``\mathcal{A}`` | ``\mathcal{O}`` | ``\gamma`` | Struct Name | Type
8+
| ------------- | ---------- | :----------: | :----------: | :----------: | :----------: | :----------: | -----------: |
9+
| Hexworld || varies | 6 | - | 0.9 | HexWorld, StraightLineHexWorld | MDP |
10+
| 2048 | - | ``\infty`` | 4 | - | 1 | TwentyFortyEight | MDP |
11+
| Cart-pole | - | ``(\subseteq \mathbb{R}^4)`` | 2 | - | 1 | CartPole | MDP |
12+
| Mountain Car | - | ``(\subseteq \mathbb{R}^2)`` | 3 | - | 1 | MountainCar | MDP |
13+
| Simple Regulator | - | ``(\subseteq \mathbb{R})`` | ``(\subseteq \mathbb{R})`` | - | 1 or 0.9 | LQR | MDP |
14+
| Aircraft collision avoidance | - | (\subseteq \mathbb{R}^3)`` | 3 | - | 1 | CollisionAvoidance | MDP |
15+
| Crying baby | - | 2 | 3 | 2 | 0.9 | CryingBaby | POMDP |
16+
| Machine Replacement | - | 3 | 4 | 2 | 1 | MachineReplacement | POMDP |
17+
| Catch | - | 4 | 10 | 2 | 0.9 | Catch | POMDP |
18+
| Prisoner's dilemma | 2 | - | 2 per agent | - | 1 | PrisonersDilemma | SimpleGame |
19+
| Rock-paper-scissors | 2 | - | 3 per agent | - | 1 | RockPaperScissors | SimpleGame |
20+
| Traveler's Dilemma | 2 | - | 99 per agent | - | 1 | Travelers | SimpleGame |
21+
| Predator-prey hex world | varies | varies | 6 per agent | - | 0.9 | PredatorPreyHexWorld, CirclePredatorPreyHexWorld | MG |
22+
| Multiagent Crying Baby | 2 | 2 | 3 per agent | 2 per agent | 0.9 | MultiCaregiverCryingBaby | POMG |
23+
| Collaborative predator-prey hex world | varies | varies | 6 per agent | - | 0.9 | CollaborativePredatorPreyHexWorld, SimpleCollaborativePredatorPreyHexWorld, CircleCollaborativePredatorPreyHexWorld | DecPOMDP
24+
25+
The last column has the following key:
26+
- MDP: Markov Decision Process
27+
- POMDP: Partially Observable Markov Decision Process
28+
- SimpleGame: Simple Game
29+
- MG: Markov Game
30+
- POMG: Partially Observable Markov Game
31+
- DecPOMDP: Decentralized Partially Observable Markov Decision Process
532

6-
![Problem Summary](figures/problemsum.svg)
733

834
## Usage
935
If we look at a specific problem whose struct is named `structName` and whose type is `type` as shown in the problem summary table. Then we are able to set up an instance of the struct for that specific problem using the following:
1036
```julia
1137
m = structName()
12-
decprob = type(m)
38+
decprob = type(m) # type in this case refers to one of MDP, POMDP, SimpleGame, MG, POMG or, DecPOMDP
1339
```
40+
An example of this would be to create an instance of the Prisoner's Dilemma struct, we would use the following code:
41+
```julia
42+
m = PrisonersDilemma()
43+
decprob = SimpleGame(m)
44+
1445

1546
### MDP Models
1647

0 commit comments

Comments
 (0)