Skip to content

Conversation

@cameronangliss
Copy link
Contributor

@cameronangliss cameronangliss commented Sep 24, 2025

I've been sitting on this code for a while but I didn't want to contribute it until I could figure out a minimal implementation, but now I have so here you go! This adds VGC teampreview as part of the MDP, overriding the previous default random action that was taken at teampreview for agents in the environment. The total teampreview, which looks like "/team wxyz" where w, x, y, and z are numbers from 1 to 6, is determined by two doubles orders given by the agent. The first order gives the Pokemon to choose in teampreview that are represented by w and x, and the second order gives y and z.

@codecov
Copy link

codecov bot commented Sep 24, 2025

Codecov Report

❌ Patch coverage is 21.62162% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.13%. Comparing base (f458350) to head (356ebf6).
⚠️ Report is 239 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #780      +/-   ##
==========================================
- Coverage   83.38%   83.13%   -0.25%     
==========================================
  Files          39       47       +8     
  Lines        3918     5628    +1710     
==========================================
+ Hits         3267     4679    +1412     
- Misses        651      949     +298     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cameronangliss cameronangliss marked this pull request as ready for review September 24, 2025 21:21
@cameronangliss
Copy link
Contributor Author

@hsahovic this is ready for review whenever you get a chance!

@hsahovic
Copy link
Owner

hsahovic commented Dec 5, 2025

I could be convinced this makes sense, but my understanding is that this is trying to rely on choose_move for teampreview, which I'm not convinced is correct. Why do you think we should generally do it that way?

@cameronangliss
Copy link
Contributor Author

@hsahovic I'm doing that because choose_move is gathering decisions from the _EnvPlayers, which is the action input from env.step(). Basically this allows the RL agent to control the battle during teampreview using switch actions. One could do it differently I suppose but I see no reason why not to do it like this, since the switch action translates 1-to-1 to the teampreview decision case (you just need to make two double-switch decisions in a row to get a teampreview decision of length 4).

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