Commit 1afb381d authored by root's avatar root
Browse files

init navigation

parent f52159df
Loading
Loading
Loading
Loading

tmpn40k8k1n

0 → 100644
+172 −0
Original line number Diff line number Diff line

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:5:0:0"
EndSection


Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    SubSection     "Display"
        Depth       24
        Virtual 1024 768
    EndSubSection
EndSection


Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:6:0:0"
EndSection


Section "Screen"
    Identifier     "Screen1"
    Device         "Device1"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    SubSection     "Display"
        Depth       24
        Virtual 1024 768
    EndSubSection
EndSection


Section "Device"
    Identifier     "Device2"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:9:0:0"
EndSection


Section "Screen"
    Identifier     "Screen2"
    Device         "Device2"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    SubSection     "Display"
        Depth       24
        Virtual 1024 768
    EndSubSection
EndSection


Section "Device"
    Identifier     "Device3"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:10:0:0"
EndSection


Section "Screen"
    Identifier     "Screen3"
    Device         "Device3"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    SubSection     "Display"
        Depth       24
        Virtual 1024 768
    EndSubSection
EndSection


Section "Device"
    Identifier     "Device4"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:141:0:0"
EndSection


Section "Screen"
    Identifier     "Screen4"
    Device         "Device4"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    SubSection     "Display"
        Depth       24
        Virtual 1024 768
    EndSubSection
EndSection


Section "Device"
    Identifier     "Device5"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:142:0:0"
EndSection


Section "Screen"
    Identifier     "Screen5"
    Device         "Device5"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    SubSection     "Display"
        Depth       24
        Virtual 1024 768
    EndSubSection
EndSection


Section "Device"
    Identifier     "Device6"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:145:0:0"
EndSection


Section "Screen"
    Identifier     "Screen6"
    Device         "Device6"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    SubSection     "Display"
        Depth       24
        Virtual 1024 768
    EndSubSection
EndSection


Section "Device"
    Identifier     "Device7"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BusID          "PCI:146:0:0"
EndSection


Section "Screen"
    Identifier     "Screen7"
    Device         "Device7"
    DefaultDepth    24
    Option         "AllowEmptyInitialConfiguration" "True"
    SubSection     "Display"
        Depth       24
        Virtual 1024 768
    EndSubSection
EndSection


Section "ServerLayout"
    Identifier     "Layout0"
    Screen 0 "Screen0" 0 0
    Screen 1 "Screen1" 0 0
    Screen 2 "Screen2" 0 0
    Screen 3 "Screen3" 0 0
    Screen 4 "Screen4" 0 0
    Screen 5 "Screen5" 0 0
    Screen 6 "Screen6" 0 0
    Screen 7 "Screen7" 0 0
EndSection
+5 −0
Original line number Diff line number Diff line
from .sokoban import SokobanEnv,SokobanConfig
from .frozenlake import FrozenLakeEnv,FrozenLakeConfig
from .navigation import NavigationEnv, NavigationConfig
REGISTERED_ENV = {
    "sokoban": {
        "env_cls": SokobanEnv,
@@ -8,5 +9,9 @@ REGISTERED_ENV = {
    "frozenlake": {
        "env_cls": FrozenLakeEnv,
        "config_cls": FrozenLakeConfig,
    },
    "navigation": {
        "env_cls": NavigationEnv,
        "config_cls": NavigationConfig
    }
}
 No newline at end of file
+2 −0
Original line number Diff line number Diff line
from .env import NavigationEnv
from .config import NavigationConfig
 No newline at end of file
+27 −0
Original line number Diff line number Diff line
from vagen.env.base_config import BaseConfig
from dataclasses import dataclass, field, fields

@dataclass
class NavigationConfig(BaseConfig):
    """Configuration class for the Navigation environment."""
    resolution: int = 500
    eval_set: str = 'base'
    exp_name: str = 'test_base'
    down_sample_ratio: float = 1.0
    fov: int = 100
    multiview: bool = False
    visual_env: bool = True
    max_actions_per_step: int = 1
    max_action_penalty: float = -0.1
    format_reward: float = 0.5

    def config_id(self) -> str:
        """Generate a unique identifier for this configuration."""
        id_fields = ["resolution", "eval_set", "exp_name", "down_sample_ratio", 
                    "fov", "multiview", "visual_env", "max_actions_per_step"]
        id_str = ",".join([f"{field.name}={getattr(self, field.name)}" for field in fields(self) if field.name in id_fields])
        return f"NavigationConfig({id_str})"

if __name__ == "__main__":
    config = NavigationConfig()
    print(config.config_id())
 No newline at end of file
+1270 −0

File added.

Preview size limit exceeded, changes collapsed.

Loading