TOAW batch processing (Full Version)

All Forums >> [Current Games From Matrix.] >> [World War II] >> Norm Koger's The Operational Art Of War III >> Scenario Design



Message


Martin_Goliath -> TOAW batch processing (8/30/2010 4:35:57 PM)

A feature that I think could be very useful in scenario validation and when verifying the behaviour of the TOAW engine is an ability to run TOAW from a command line without invoking a graphical window. Let me exemplify:

>"Opart 3.exe" -nographics Test1.sce
would run the scenario Test1 in Elmer vs. Elmer mode from beginning to end, producing whatever output files that are set in the ini file (sitrep logs, toaw_log.txt and/or screen dumps).

>"Opart 3.exe" -nographics Test1.sal
would resolve all planned attacks (if any) in the save file Test1.sal and quit, producing output as above.

Given these features, it is simple to write a script that has the computer run any number of replications of a whole scenario or setup situation, and then performs whatever post-processing you want. For instance, someone more skilled in image processing than I would probably be able to produce images of average forward edge of battle advance from the screen dumps generated from repeated Elmer vs Elmer runs. If VP information were included in the sitrep log, it would be easy to produce statistics for victory points as a function of turn.

As an example, I have written a crude script that (assuming that the above feature exists) would work in the following manner:

> TOAWbatch Test1 1000

  • resolves attacks planned in the save file Test1.sal (provided it exists) 1000 times
  • stores the sitrep logs and toaw_log.txt in consecutively numbered directories, Run0 through Run999
  • Collects information about force 1 losses of rifle squads from all runs
  • Outputs, e.g.: "Mean losses of Rifle Squad for 1st Force: 345.7 +-21.34"






ralphtricky -> RE: TOAW batch processing (8/31/2010 7:01:30 AM)

Try "Opart 3.exe" -p2 -noupdate test1.sce

noupdate turns off most of the graphics updating.

I think you can also put sitreplog and most other options on the command-line.

It doesn't exit when done, which is a drawback to automating, but please let me know if it works otherwise.

Ralph


quote:

ORIGINAL: MarGol

A feature that I think could be very useful in scenario validation and when verifying the behaviour of the TOAW engine is an ability to run TOAW from a command line without invoking a graphical window. Let me exemplify:

>"Opart 3.exe" -nographics Test1.sce
would run the scenario Test1 in Elmer vs. Elmer mode from beginning to end, producing whatever output files that are set in the ini file (sitrep logs, toaw_log.txt and/or screen dumps).

>"Opart 3.exe" -nographics Test1.sal
would resolve all planned attacks (if any) in the save file Test1.sal and quit, producing output as above.

Given these features, it is simple to write a script that has the computer run any number of replications of a whole scenario or setup situation, and then performs whatever post-processing you want. For instance, someone more skilled in image processing than I would probably be able to produce images of average forward edge of battle advance from the screen dumps generated from repeated Elmer vs Elmer runs. If VP information were included in the sitrep log, it would be easy to produce statistics for victory points as a function of turn.

As an example, I have written a crude script that (assuming that the above feature exists) would work in the following manner:

> TOAWbatch Test1 1000

  • resolves attacks planned in the save file Test1.sal (provided it exists) 1000 times
  • stores the sitrep logs and toaw_log.txt in consecutively numbered directories, Run0 through Run999
  • Collects information about force 1 losses of rifle squads from all runs
  • Outputs, e.g.: "Mean losses of Rifle Squad for 1st Force: 345.7 +-21.34"








Martin_Goliath -> RE: TOAW batch processing (8/31/2010 6:39:28 PM)

Ralph,

Thanks for the reply. I seem to have some trouble launching TOAW from a command line in that it does not automatically take me beyond the opening screen. That is,
"Opart 3.exe" test1.sal
does not open the save file, but double-clicking the sal file in Explorer does, etc. I don't see why this is so, since the command invoked when double-clicking to my knowledge is what I type on the command line [X(]

"Opart 3.exe" -p2 -noupdate test1.sce partially works as intended: TOAW does not automatically jump into the scenario, but manually opening a scenario from the opening screen will result in an Elmer vs Elmer duel with minimal graphics updates to the bitter end. However, what I am really after is the ability to run the TOAW engine without ever launching a graphical window at all.

Regards,
Martin




ralphtricky -> RE: TOAW batch processing (9/12/2010 11:30:46 PM)

Martin,
If you put the filename in "" like "auto.sal" it will open the file in play mode. It looks like the p2 is overwritten when you load the scenario, so I'll have to move some code around and test it. I'll look into that for 3.5, I'm trying to make only critical changes for 3.4. I'll look into adding a -auto or something to open minimized and close when done.

If you do that for a .sce file right now, it should open it in the editor, some scenarios need the po option set correctly on first open, so this was safer.

Unfortunately, the code right now doesn't have a clear separation between the business logic and the display logic, but if you change it to start minimized, or for now, minimize it after starting, it will do even less display that the -noupdate option in Elmer v Elmer mode, so it should be pretty fast.

Ralph





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
3.203125