randomeventsimulator

command module
v0.0.0-...-f79884f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2023 License: MIT Imports: 6 Imported by: 0

README

The Random Event Simulator

About this program

This program is a simulater which runs through the given map of events and the probabilities of jumps from one event to another by comparing the current random number with the probabilities of each jump.

Input Format

The input is stored in the "events" file, and the format is shown as follows.

Id, Name, Number of Jumps, Jump Probability, Jump ID, ...
0, Entry,   3, 0.8,   1, 0.1,   2, 0.05, 3
1, Event 1, 1, 0.5,   2
2, Event 2, 2, 0.6,   3, 0.2, 1
3, Event 3, 0, 0,     3

Each row is an entry of each event. The length of each row depends on the number of probable jumps.

Outputs

The program first prints out the parsed map of the random events and then runs a simulation.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL