Game Development Reference
In-Depth Information
Collecting Data from Multiple Runs
Artificial players allow you to run diagrams
and test games automatically. To make the
best use of this option, the Machinations
Tool allows you to quick run the diagram
( Figure 8.2 ). You do this by switching to the
Run tab in the tool and clicking the Quick
Run button. While quick running, the dia-
gram executes very quickly but doesn't
allow any interaction. If you are using quick
run, you must make sure that the diagram
has an end condition and can actually reach
that end condition. If the diagram keeps on
running without reaching an end condition,
you can click the Quick Run button again
(which is now labeled Stop) to stop it manu-
ally. Click the same button once more to
reset the diagram back to its starting condition.
FIGURe 8.2 The run panel of the
machinations Tool
You also have the option to run a diagram multiple times. To do this, go to the Run
tab in the Machinations Tool and click the Multiple Runs button. By default, the
number of times that a diagram runs is set to 100, but you can easily change this
number in the Run tab. To prevent the tool from running endlessly, if a running
diagram in a multiple run batch doesn't reach an end condition after 10,000 time
steps, it will stop automatically. When running multiple times, the diagram will
keep track of the number of times that each of its end conditions were reached. If
you have a game with two players that each have their own win condition (which
would be an end condition also), this makes it easy to determine who wins more
often. This feature was used to create the statistical data given in some of the exam-
ples in this topic. When you run a diagram multiple times, the diagram also keeps
track of the elapsed time of each run and lets you know the overall average, which
can be useful when comparing different artificial player scripts to see which script
drives the economy toward a particular state (normally victory!) the fastest.
Finally, if your diagram contains a chart, the data from each run is stored in the
chart ( Figure 8.3 ). By default, charts display the data from the last 25 runs, but they
store more. You can actually browse through all the data captured by the chart by
clicking the << and >> symbols below the chart. The data from the current run will
be bright while the other runs are dim. (Figure 8.3 is currently showing the results
from the 97th run.) To clear a chart's data between simulations, click the word clear
on the chart. You can also save the collected data as a comma-separated values data
file (*.csv) for further analysis in a spreadsheet or statistics program. To do this, click
the word export below the chart and choose a location to save the file.
 
Search WWH ::




Custom Search