Marathon Local Tester
Since MM118, marathon local testers use a common code infrastructure, which was created to make the usage and the development of new MM testers easier and standardized.
This article summarizes the available command line options:
https://www.topcoder.com/thrive/articles/marathon-local-tester-parameters
Please, use this thread for generic questions related to marathon local tester usage.
Comments
We will have upvotes soon, but until then, take one from me!
+1
Is it intentional that this "common code infrastructure" is not included in the local testing tools that are available from the problem statement?
Or is this an oversight?
As of MM124, there doesn't seem to be a way of obtaining the source code for the MarathonTester base class short of decompiling the tester.jar.
It was an oversight, and I guess the common insfrastucture source code has been added now.
Recently @nika suggested a new feature:
Other members (@JacoCronje, @sullyper, @dimkadimon) contributed with ideas and @eulerscheZahl shared an interesting solution:
As this discussion started in MM131 forum, which I guess is not visible for everyone, I am moving it to this thread.
I already started working on this feature last week, also using a decorator around Graphics2D (same idea shared by @eulerscheZahl). It should still take me some time to finish a working version though.
Here is a BETA version of the "REPLAY" feature.
Links to the updated visualizers for a few past matches (just let me know if you would like to test in another problem):
MM131 - StopTheElves
https://drive.google.com/uc?export=download&id=1denRwFeu7phwmUsJVJHL8xPEZIiTjl5h
TCO21 Final - CoinCollector
https://drive.google.com/uc?export=download&id=1ryUXA0byv1l4lPC6w9CzmE4k8RF6xgaA
MM123 - Jewels
https://drive.google.com/uc?export=download&id=1gTCtXEB1iOcoa9g1fn6nYsp_H_KgVYWI
The source code is inside the JAR file. Just expand it (like a ZIP) if you want to check the code, compile from the source, or make any changes.
The goal of the "replay" feature is to allow moving back to previous states in the visualizer (currently is only possible to pause, resume and move a single step).
It should work for any problem that uses an animated visualizer (interactive or not).
There are 3 ways to control:
There are two other buttons to decrease / increase the delay between frames.
It is possible to disable this feature (which consumes memory, but not that much, at least in the tests I made so far) by using the command parameter
-nr
(or-noReplay
).When replay is disabled, only SPACE and LEFT arrow works.
Another detail, the "delay" must be enabled. If delay is set to zero (
-dl 0
), the replay won't work.Note that depending on the visualizer there could be more frames than turns/steps.
Not direct related, but I would like to mention another tester parameter:
-na
(or-noAntialiasing
).Depending on the machine you are using, it can speed up a lot the visualizer's painting process (in exchange for a lower render quality).
It has been available for quite some time, but I think many competitors are not familiar with.
Now with the "replay" feature, this parameter can be useful to allow faster navigation.
This is great! Very smooth and functional.
I would probably swap UP/DOWN buttons with each other, increasing turn number with UP seems more natural.
Thanks for the feedback @nika!
And for the feature suggestion!
I was unsure about which direction UP and DOWN should go.
I thought about a text file, in which UP moves towards the beginning.
But simply UP for increasing makes more sense.
EDIT: I just updated the post and the visualizers. Now UP moves forward 10 frames and DOWN rewinds 10 frames.