<commit_before># YAML Format
## Model
```
model:
 time_horizon: # MPC horizon

 dt: # time steps

 vars:
   state: [x y] # list of state variables
   input: [u] # list of input variables
   env: [w] # list of environment variables

 bounds: # list of key-values, variable: (lower_bound, upper_bound)
   x: (0, 2) # example for variable x
```

## Specification

```
init:
  - stl: x = 0
  - stl: y = 1

sys:
  - name: FooBar # optional name for the constraint
    stl: "F[0,2](x > 5)"
    pri: 1 # optional priority metadata for diagnosis

dyn: # Dynamics, given in slight extension of stl. 
     # Adding primes to variable means previous state.
     # For example: x' is x[t - dt]
  - stl: G[0, 4](-1*u' + dt*1*x' + 5*u = 0)
  - stl: G[0, 4](-1*u' + dt*1*y' + u = 0)
```

See examples/feasible_example.yaml

# Non-Adversarial one off game

```python
import blustl

# Load game scenario
g = blustl.from_yaml("examples/feasible_example.yaml")

# Create spec for game
spec = blustl.one_off_game_to_sl(g)

# Pass spec to MILP oracle and print solution
print(blustl.encode_and_run(spec))
```

# Non-Adversarial MPC Usage example

```python
import blustl

# Load game scenario
g = blustl.from_yaml("examples/feasible_example.yaml")

# Create generator receding horizon mpc

controller = blustl.mpc(g)
print(next(controller)[0]) # prints state
print(next(controller)) # prints state, spec
print(controller.send(measurements)) # send measurements and print state, spec
```

# Adversarial MPC Usage example

Coming Soon<commit_msg>updated encode_and_runto have 2 args in README<commit_after># YAML Format
## Model
```
model:
 time_horizon: # MPC horizon

 dt: # time steps

 vars:
   state: [x y] # list of state variables
   input: [u] # list of input variables
   env: [w] # list of environment variables

 bounds: # list of key-values, variable: (lower_bound, upper_bound)
   x: (0, 2) # example for variable x
```

## Specification

```
init:
  - stl: x = 0
  - stl: y = 1

sys:
  - name: FooBar # optional name for the constraint
    stl: "F[0,2](x > 5)"
    pri: 1 # optional priority metadata for diagnosis

dyn: # Dynamics, given in slight extension of stl. 
     # Adding primes to variable means previous state.
     # For example: x' is x[t - dt]
  - stl: G[0, 4](-1*u' + dt*1*x' + 5*u = 0)
  - stl: G[0, 4](-1*u' + dt*1*y' + u = 0)
```

See examples/feasible_example.yaml

# Non-Adversarial one off game

```python
import blustl

# Load game scenario
g = blustl.from_yaml("examples/feasible_example.yaml")

# Create spec for game
spec = blustl.one_off_game_to_sl(g)

# Pass spec to MILP oracle and print solution
print(blustl.encode_and_run(spec, g))
```

# Non-Adversarial MPC Usage example

```python
import blustl

# Load game scenario
g = blustl.from_yaml("examples/feasible_example.yaml")

# Create generator receding horizon mpc

controller = blustl.mpc(g)
print(next(controller)[0]) # prints state
print(next(controller)) # prints state, spec
print(controller.send(measurements)) # send measurements and print state, spec
```

# Adversarial MPC Usage example

Coming Soon
{'fraction_non_alphanumeric': 0.12426995457495132, 'fraction_numerical': 0.013303049967553536, 'mean_word_length': 3.8936507936507936, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4949568', 'n_tokens_mistral': 1154, 'n_tokens_neox': 1074, 'n_words': 350}