Skip to content

Commit

Permalink
Start documenting MILP model
Browse files Browse the repository at this point in the history
  • Loading branch information
ExcaliburZero authored Jul 7, 2024
1 parent fe62e9f commit e6dad2d
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,44 @@ conda activate trails_through_daybreak_lgc_alignment_choices

# Install library and dev dependencies (ex. linting tools)
pip install -e '.[dev]'
```
```

## MILP model
WIP: Writing in progress

### Variables

```math
R_{x} = \text{1 if route ``x'' was chosen in Chapter 5, else 0}
```

```math
A_{a_b} = \text{Score of alignment ``a'' at the end of Chapter ``b''}
```

```math
O_{c} = \text{1 if choice ``c'' was chosen, else 0}
```

```math
H_{e} = \text{1 if the correct route was chosen for event ``e'', else 0}
```

### Constraints
Choose exactly one of the routes in Chapter 5.

```math
R_{law} + R_{grey} + R_{chaos} + R_{fourth} = 1
```

Choose exactly one of the choices for each dialog prompt.

```math
\forall_{e \in events} \left(\sum_{c \in e.choices} O_{c}\right) = 1
```

Model the alignment scores at the end of each chapter.

```math
\forall_{a \in \{law, grey, chaos\}} \forall_{c \in \{1, 2, 3, 4, 5, 6, 7\}} A_{ac} = \sum_{e \in \{d \in events \mid d.chapter <= c\}} \left(H_{e} * e.completion.a + H_{e} * \left(\sum_{h \in e.choices} O_c * h.a\right)\right)
```

0 comments on commit e6dad2d

Please sign in to comment.