Skip to content

Commit

Permalink
TERM_SESSION_ID=w0t0p0:8A09846D-45E4-45E6-9AFE-C591885D192A
Browse files Browse the repository at this point in the history
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.dekcBjReVV/Listeners
LC_TERMINAL_VERSION=3.4.21
COLORFGBG=15;0
ITERM_PROFILE=Main
XPC_FLAGS=0x0
PWD=/Users/ucak/MOMAS/momadm-bechmarks
SHELL=/bin/zsh
__CFBundleIdentifier=com.googlecode.iterm2
LC_CTYPE=UTF-8
TERM_PROGRAM_VERSION=3.4.21
TERM_PROGRAM=iTerm.app
PATH=/Users/ucak/MOMAS/momadm-bechmarks/.venv/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
LC_TERMINAL=iTerm2
COLORTERM=truecolor
COMMAND_MODE=unix2003
TERM=xterm-256color
HOME=/Users/ucak
TMPDIR=/var/folders/s5/3px3g159399c2l1bm_n1bw4c0000gn/T/
USER=ucak
XPC_SERVICE_NAME=0
LOGNAME=ucak
ITERM_SESSION_ID=w0t0p0:8A09846D-45E4-45E6-9AFE-C591885D192A
__CF_USER_TEXT_ENCODING=0x0:0:0
SHLVL=1
OLDPWD=/Users/ucak/MOMAS
ZSH=/Users/ucak/.oh-my-zsh
HOMEBREW_PREFIX=/opt/homebrew
HOMEBREW_CELLAR=/opt/homebrew/Cellar
HOMEBREW_REPOSITORY=/opt/homebrew
MANPATH=/opt/homebrew/share/man::
INFOPATH=/opt/homebrew/share/info:
PAGER=less
LESS=-R
LSCOLORS=Gxfxcxdxbxegedabagacad
LS_COLORS=di=1;36:ln=35:so=32:pi=33:ex=31:bd=34;46:cd=34;43:su=30;41:sg=30;46:tw=30;42:ow=30;43
VIRTUAL_ENV=/Users/ucak/MOMAS/momadm-bechmarks/.venv
PS1=(.venv) %(?:%{�[01;32m%}➜ :%{�[01;31m%}➜ ) %{�[36m%}%c%{�[00m%} $(git_prompt_info)
VIRTUAL_ENV_PROMPT=(.venv)
_=/usr/bin/env, ,  functions
  • Loading branch information
umutucak committed Oct 11, 2023
1 parent 9687560 commit 9b22950
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 4 deletions.
5 changes: 5 additions & 0 deletions momadm_benchmarks/envs/multiwalker/momultiwalker_v0.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
"""Multiwalker domain environment for multi-objective optimization."""
from momadm_benchmarks.envs.multiwalker.multiwalker import env, parallel_env, raw_env


__all__ = ["env", "parallel_env", "raw_env"]
34 changes: 31 additions & 3 deletions momadm_benchmarks/envs/multiwalker/multiwalker.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,53 @@
from pettingzoo.utils import wrappers

from momadm_benchmarks.envs.multiwalker.multiwalker_base import MOMultiWalkerEnv as _env
from momadm_benchmarks.utils.conversions import mo_aec_to_parallel
from momadm_benchmarks.utils.env import MOAECEnv


def env(**kwargs):
"""Autowrapper for the multiwalker domain.
"""Returns the env in `AEC` format.
Args:
**kwargs: keyword args to forward to the raw_env function.
Returns:
A fully wrapped AEC env.
"""
env = raw_env(**kwargs)
return env


def parallel_env(**kwargs):
"""Returns the env in `parallel` format.
Args:
**kwargs: keyword args to forward to the raw_env function.
Returns:
A fully wrapped parallel env.
"""
env = raw_env(**kwargs)
env = mo_aec_to_parallel(env)
return env


def raw_env(**kwargs):
"""Returns the wrapped env in `AEC` format.
Args:
**kwargs: keyword args to forward to create the `MOMultiwalker` environment.
Returns:
A fully wrapped env.
"""
env = mo_env(**kwargs)
env = MOMultiwalker(**kwargs)
env = wrappers.ClipOutOfBoundsWrapper(env)
env = wrappers.OrderEnforcingWrapper(env)
return env


class mo_env(MOAECEnv, pz_multiwalker):
class MOMultiwalker(MOAECEnv, pz_multiwalker):
"""Environment for MO Multiwalker problem domain.
The init method takes in environment arguments and should define the following attributes:
Expand Down
3 changes: 2 additions & 1 deletion tests/all_modules.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from momadm_benchmarks.envs.beach_domain import mobeach_v0

from momadm_benchmarks.envs.multiwalker import momultiwalker_v0

all_environments = {
"mobeach_v0": mobeach_v0,
"momultiwalker_v0": momultiwalker_v0,
}

1 comment on commit 9b22950

@umutucak
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure about the commit message. should instead say:

"env, parallel_env, raw_env functions"

Please sign in to comment.