Randomize Options Users Manual

Table of Contents

Introduction(Table of Contents)

The Randomize Options application generates a random set of items from a user-defined set of groups. One item from each group is randomly selected. This program was originaly developed for my father to support the generation of the game starting conditions for a computer golfing league. However, Randomize Options can be configured for any situation where a random set of items are needed.

Main Window(Table of Contents)

The Main Window displays the group names along the left edge of the window. Each time the Randomize button is pressed, a new set of random items will be generated. The selected items are displayed the the right of the group names.

For example, figure 1 shows 5 groups named "Wind Speed", "Green Hardness", "Green Speed", "Pin Difficulty", and "Tee Position". No items are displayed in figure 1 because the Randomize button has not been pressed yet.


Figure 1

When Randomize Options is launched, it will attempt to open the default configuration file randcfg.ini. This file MUST be located in the same folder as the Randomize Options executable. If this file is not found, the main window will appear as shown in figure 2.


Figure 2

There are 2 ways to load an option configuration file. You can drag and drop the option configuration file onto the main window, or use the File:Open... menu. See the File Menu section for more information.

If this is the very first time you are running the Randomize Options application, no option configuration file will be found. You must create the option groups, and the items in each group. The following sections will explain how this is done.

File Menu(Table of Contents)

The file menu contains 6 choices as shown in Figure 3.


Figure 3
New... This choice unloads the current option configuration and creates a new, empty configuration.
Open... This choice loads an existing option configuration file. You may also load an option configuration file by dragging and dropping an option configuration file onto the main window.
Groups... This choice displays the Groups dialog box. This dialog is used to create a new option configuration or modify an existing one. See the Groups Dialog section for more information.
Save This choice saves a modified option configuration to the current file. If an option configuration has been modified, an asterisk is displayed in the title bar of the main window.
Save As... This choice saves an option configuration to a new file.
Exit This choice terminates the Randomize Options application. If the OC has been modified, you will be prompted to save the file.

Groups Dialog(Table of Contents)

The Groups Dialog is used to define the random option groups and the items in each group. Each group contains one or more weighted items. An empty Groups Dialog box is shown in figure 4.


Figure 4

A group is created by pressing the New Group... button. The Group Properties dialog box will display. See the Group Properties Dialog section for more information. After creating groups, they are displayed in the Groups dialog box as shown in figure 5. Of course, your group names may be different. Group items can now be created.


Figure 5

A group item is created by selecting a group name from the display and then pressing the New Item... button. The Item Properties dialog box will display. See the Item Properties Dialog section for more information. After creating group items, they are displayed in the Groups dialog box as shown in figure 6. Of course, your group item names may be different.


Figure 6

When finished, press the OK button to save the random option groups and group items and close the Groups dialog box. Pressing the Cancel button will discard any changes and close the Groups dialog box.

In addition to using the New Group... and New Item... buttons as explained above, you can also right-click on any group or group item to display a popup menu as shown in figure 7. The menu choices are explained below.


Figure 7
Properties... If right-clicking on a group name, this choice displays the Group Properties dialog box. See the Group Properties Dialog section for more information.
  If right-clicking on a group item name, this choice displays the Item Properties dialog box. See the Item Properties Dialog section for more information.
New Item... This choice displays the Item Properties dialog box. See the Item Properties Dialog section for more information.
Rename This choice will activate the in-place edit if the group or item name without displaying a properties dialog box.
Delete This choice deletes the selected group or item from the configuration. Be careful! This operation cannot be reversed unless you re-open the configuration file without saving first. Or, you can save the configuration under a differnt file name. See the File Menu section for more information.

Group Properties Dialog(Table of Contents)

The Group Properties dialog box shown in figure 8 is used to define a new random option group. This dialog is accessed from the Groups Dialog.


Figure 8

Enter the option group's name and description. The group name MUST be unique. The description can be any text you want and will be displayed in a tooltip when you move the mouse over the group name in the Groups dialog box as shown in figure 9.


Figure 9

When finished, press the OK button to save the new group and close the Group Properties dialog box. If you have more groups to create, press the Apply button to save the new group. The Group Properties dialog box will not close and you can enter a new group name and description. Pressing the Cancel button will discard any changes and close the Group Properties dialog box.

Item Properties Dialog(Table of Contents)

The Item Properties dialog box shown in figure 10 is used to define a new random option group item. This dialog is accessed from the Groups Dialog.


Figure 10

Enter the group item's name, description and weight value. The item name MUST be unique within the group. The description can be any text you want and will be displayed along with the weight value in a tooltip when you move the mouse over the group item name in the Groups dialog box as shown in figure 11.


Figure 11

The item's weight value must be an integer greater than or equal to zero. When the randomizer chooses a group item, the weight will control how likely (on average) a particular item will be selected. The exact item weight value is not important. Only the ratio between item weights within a group is important.

The ratio of each item is determined by dividing an items weight value by the total of all weight values within a group. For example, if I1 has a weight of 1, and I2 has a weigth of 3, the randomizer will select I1 1 out of every 4 (=1+3) times (25%). I2 will be selected 3 out of every 4 times (75%).

It is important to remember that these averages will only be maintained for a large set of samples. Do not be alarmed if the least likely option shows up two or three in a row. As in all random selections, the 25%/75% ratio would only be maintained if you were to look at the results from several hundred selections. Like flipping a coin, the chance of heads or tails is 50/50. But is possible that for any 5 flips, you could get 4 heads and only 1 tails. But if you did 1000 flips, the counts would be very close to 500 each (for example, 495 to 505).

If an item has a weight of 0, it will be ignored when making random selections. In effect, you are turning OFF the item without having to delete it from the group.

When finished, press the OK button to save the new group item and close the Item Properties dialog box. If you have more group items to create, press the Apply button to save the new group item. The Item Properties dialog box will not close and you can enter a new group item name, description, and weight. Pressing the Cancel button will discard the new group item and close the Item Properties dialog box.