Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TaskEnvironment #49

Merged
merged 67 commits into from
May 30, 2023
Merged

Conversation

SynapticSage
Copy link
Contributor

@SynapticSage SynapticSage commented May 29, 2023

This PR introduces a TaskEnvironment that inherits ratinabox.Environment and pettingzoo.env environments. The main goal is to provide a streamlined interface for encoding and executing tasks and to improve the integration of RIB with reinforcement learning tools compatible with Gym APIs, like Stable Baselines3 and Rllib.

… by default have certain things like agents and environments that they can gym.render(). SpatialGoal env merely adds an ability at the end of that pipeline to render spatial goal.
…ions now for distance. option added to teleport agent to new location at end of each episode.
…ize curve. Size and color however change dynamically in plot_trajectory, so blitting will not faithfully reproduce with only a set_offset() call. Added _agent_style() static method that temporarily keeps that styling similar (dynamically recomputing color,size). Meaning some changes there will not fully propagate here until Agent has its own render() method.
…itialize causes regression when the second agent appears. I may have to purely mimic the style and not initialize with it for now.
…naling logic. Solved a bug where rewards need to copy the default object instead of reference it.
…goal which allow calling set() on a collection of goals. goalcache returns full set of unique goals with get_goals() or agent-specific goals qwith get_agent_goals()
…oo's official test suite, too. made some changes in order to pass the test -- pettingzoo env required a list of active, non-terminated agents env.agents:list[str]
… field is now TaskEnvironments.Ags. Also simplified the goal_cache/taskenvironment relation --- reduced cognitive load for a programmer to learn, plus a little cleaner. helpful changes to tutorials. test_taskenvironment refactors for breaking changes from dev.
…put of reset() to match new API and set setup.cfg requirement
@TomGeorge1234 TomGeorge1234 merged commit 0b7902c into RatInABox-Lab:dev May 30, 2023
@TomGeorge1234
Copy link
Collaborator

excellent work. very excited to give this a go! feel free to keep PR as/when you change or improve things

thanks again for the excellent work here and for making it public, I think this will benefit a lot of users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants