Conversation
Collaborator
|
I'm going to finnish off what I started on #305 but I see you're modifying achievements so I'll wait until you finish this. |
…o instance, add tests
0d66e5c to
e9c36f6
Compare
Owner
|
Nice work!
|
Collaborator
|
is it possible to parametrize the new tests?
sleeping tests done on a single worker starve the other workers in distributed testing, parameterizing as well as using |
Collaborator
seems to be a convenience method |
kiankyars
reviewed
Aug 25, 2025
Collaborator
kiankyars
left a comment
There was a problem hiding this comment.
I reviewed the API improvements only and the other changes look great for QOL from the surface.
JackHopkins
pushed a commit
that referenced
this pull request
Sep 29, 2025
* clean up achievements; fix value accrual time; report flows better * use pause, remove value accrual time * make clients sleep correct time, add more speed and pausing methods to instance, add tests * server adminlist * clean up code, add more Instance methods, render pause message, tests passing' * add tests for elapsed ticks * fix run_eval * game control; * tests * tests * task info * game control and medium electric poles * change prints, max achieved throughput
JackHopkins
pushed a commit
that referenced
this pull request
Sep 29, 2025
* clean up achievements; fix value accrual time; report flows better * use pause, remove value accrual time * make clients sleep correct time, add more speed and pausing methods to instance, add tests * server adminlist * clean up code, add more Instance methods, render pause message, tests passing' * add tests for elapsed ticks * fix run_eval * game control; * tests * tests * task info * game control and medium electric poles * change prints, max achieved throughput
JackHopkins
pushed a commit
that referenced
this pull request
Sep 29, 2025
* clean up achievements; fix value accrual time; report flows better * use pause, remove value accrual time * make clients sleep correct time, add more speed and pausing methods to instance, add tests * server adminlist * clean up code, add more Instance methods, render pause message, tests passing' * add tests for elapsed ticks * fix run_eval * game control; * tests * tests * task info * game control and medium electric poles * change prints, max achieved throughput
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactor Environment Timing and Pause/Unpause System
This PR implements a comprehensive refactor of the Factorio Learning Environment's timing system, removes the problematic value accrual mechanism, and adds robust pause/unpause functionality.
Key Changes
Removed Value Accrual Time from Environment
value_accrual_timeparameter fromFactorioGymEnv.__init__()env.step()logic to calculate rewards immediately after action execution rather than after waitingEnhanced Instance Pause/Unpause System
FactorioInstanceset_speed_and_unpause()- common use case for starting actionspause_at_speed()- set speed but pause immediatelytoggle_pause()- switch between paused/unpaused statesis_paused()- check current pause statepause_after_actionparameter toFactorioGymEnv- enables pausing between trajectory stepsServer Admin Configuration
server-adminlist.jsonto enable/editormode and other admin commands"client_master"as admin to allow full server control during development/testingComprehensive Test Suite Additions
test_elapsed_ticks.pywith 15+ new tests covering:Achievements System Cleanup
AchievementTrackerclasscalculate_achievements()functionTool Timing Improvements
move_to,craft_item,harvest_resource,connect_entities) to:sleep()tool to work with standard tick calculations rather than pollingAPI Improvements
num_agentsoptional in task configurations (defaults to 1)run_eval.pyMigration Notes
value_accrual_timeparameter removed fromFactorioGymEnv- remove from instantiation callsset_speed_and_unpause()instead of separateset_speed()calls in most casespause_after_action=Falsefor immediate execution scenariosThis refactor significantly improves the environment's usability for both training and evaluation while maintaining full backward compatibility for core functionality.