Skip to content
Snippets Groups Projects
Commit d8ca40de authored by Florian Schröder's avatar Florian Schröder
Browse files

Add OrderConfig and EnvironmentConfig classes in utils.py

The OrderConfig and EnvironmentConfig classes were added to the utils.py file in the Overcooked simulator. These classes help define the structure and type of orders and environments used in the simulation, contributing to the manageability and modularity of the codebase.
parent eff27363
No related branches found
No related tags found
1 merge request!37Resolve "Type hint class for environment config"
Pipeline #44814 passed
......@@ -3,8 +3,27 @@ import os
import sys
from datetime import datetime
from enum import Enum
from typing import TypedDict, Literal, Type, Any, Callable, Tuple
from overcooked_simulator import ROOT_DIR
from overcooked_simulator.counters import PlateConfig
from overcooked_simulator.game_items import Item
from overcooked_simulator.order import OrderGeneration
from overcooked_simulator.player import PlayerConfig
class OrderConfig(TypedDict):
order_gen_class: Type[OrderGeneration]
order_gen_kwargs: dict[str, Any]
serving_not_ordered_meals: Callable[[Item], Tuple[bool, float]]
class EnvironmentConfig(TypedDict):
plates: PlateConfig
game: dict[Literal["time_limit_seconds"], int]
meals: dict[Literal["all"] | Literal["list"], bool | list[str]]
orders: OrderConfig
player_config: PlayerConfig
def create_init_env_time():
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment