Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(envs): Add NegotiateToSurvive environment - 5-player resource trading survival game - #166

Open
cstorm125 wants to merge 5 commits into
TextArena:mainfrom
cstorm125:negotiate_to_survive
Open

feat(envs): Add NegotiateToSurvive environment - 5-player resource trading survival game#166
cstorm125 wants to merge 5 commits into
TextArena:mainfrom
cstorm125:negotiate_to_survive

Conversation

@cstorm125

Copy link
Copy Markdown
Contributor
  • Implement complete 5-player survival negotiation game with distributive/integrative variants
  • Add coin-based economy with resource trading mechanics (coins for resources, no bartering)
  • Support multiple resource ownership per player with proper ownership tracking
  • Include private whisper system with sender identification and public notifications
  • Add comprehensive action validation preventing self-interaction exploits
  • Implement individual survival tracking (4/5 resources for distributive, 5/5 for integrative)
  • Create robust error handling with escalation system and retry mechanisms
  • Add 28 comprehensive unit tests covering all critical functionality
  • Include detailed README.md with usage examples and strategic guidance
  • Register both distributive and integrative variants

Reference

Sotak, K. L., & Abraham, S. E. (2021). Negotiate to survive: An exercise to help develop students’ understanding of negotiations. Journal of Education for Business, 96(4), 269-273.

cstorm125 and others added 5 commits August 22, 2025 01:59
…ading survival game

- Implement complete 5-player survival negotiation game with distributive/integrative variants
- Add coin-based economy with resource trading mechanics (coins for resources, no bartering)
- Support multiple resource ownership per player with proper ownership tracking
- Include private whisper system with sender identification and public notifications
- Add comprehensive action validation preventing self-interaction exploits
- Implement individual survival tracking (4/5 resources for distributive, 5/5 for integrative)
- Create robust error handling with escalation system and retry mechanisms
- Add 28 comprehensive unit tests covering all critical functionality
- Include detailed README.md with usage examples and strategic guidance
- Register both distributive and integrative variants
# Conflicts:
#	textarena/envs/__init__.py
@borgr

borgr commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Ready to merge. The branch was behind main and conflicted in textarena/envs/__init__.py. The branch's base still had its own copies of WinAsMuchAsYouCan / ScorableGames, which main has since added — so a naive merge would have double-registered them. I took main's registry and appended only the genuinely-new entries:

register_with_versions(id="NegotiateToSurvive-v0-distributive", entry_point="textarena.envs.NegotiateToSurvive.env:NegotiateToSurviveEnv", wrappers={"default": DEFAULT_WRAPPERS, "-train": DEFAULT_WRAPPERS}, game_variant="distributive", max_rounds=100, starting_coins=50)
register_with_versions(id="NegotiateToSurvive-v0-integrative",  entry_point="textarena.envs.NegotiateToSurvive.env:NegotiateToSurviveEnv", wrappers={"default": DEFAULT_WRAPPERS, "-train": DEFAULT_WRAPPERS}, game_variant="integrative",  max_rounds=100, starting_coins=50)

Verified locally on 3.11: both variants make; 5-player reset + step succeed; WinAsMuchAsYouCan is registered exactly once (no duplicate). Now MERGEABLE / CLEAN.

@borgr

borgr commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Thanks for this, @cstorm125. I've rebased it onto current main, normalized rewards to the repo's -1/0/1 convention, and registered both variants; opened #201 so it can merge cleanly. Full-episode verification (both variants + survival-failure) and your 28-test suite all pass. Credit to you for the design — happy to land it there or here, whichever you prefer.

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