Greetings,
As many of us know, there are several subtle nuances that go into reactor design. It can be very taxing to scale reactor output with reactor dimensions. What's worse, one minor change results in a significant reduction in power production, making the debugging process a bit of a nightmare.
Fortunately, the world of biology has a solution for this. By using a process called a genetic algorithm and by entertaining the notion that reactors might be able to mate and have offspring, one is able to "breed" a population of reactors which approach optimal power output with each successive generation. This program essentially refines initially random reactor designs to meet some fitness function (by default, power generation), filtering out poorly performing reactors and preferring those with the highest yield.
If this sounds awesome to you, here's something even better: the program is both Free as in Beer and Free as in Freedom. The project, source code and all, can be found here: https://sourceforge.net/projects/reactorbreeder/. The more StarMade players can benefit from this, the better; the hope is that some day, you might get involved in improving this program, too!
Usage/Requirements:
This program requires Java JRE 1.7 to run. This should be no problem if you are running StarMade; you probably already have the prerequisites covered. Simply download the JAR (), or, if you do not trust the binary on SourceForge, review the source code and compile. There are two versions available:
To begin using Reactor Breeder, you need to first create a population. Do so by using the File > Create... command. You will be presented with a dialog that allows you to enter your reactor dimensions and population size. Block dimensions can theoretically be up to some 2 billion cubed; however, more practically, this is limited by the amount of memory you have (for instance, a 100x100x100 reactor requires 1000 times more memory than a 10x10x10 one). You can also set the population size, which is the number reactors pitted against each at any given time. Once you are satisfied, click the "Create Button" and you can start the experiment.
The parameters (by default) are probably good enough to get started. However, if you want to play around with the options, these are the parameters:
Once you are ready, hit the "Start simulation" button to begin the vicious cycle of life. When the simulation is running, you can "cancel" the simulation at any point without losing your current progress. Regardless of how the simulation has ended, you can always restart the simulation without worrying about losing your progress; it will simply pick up where it left off.
Finally, you can view your reactors with the "Visualization". The reactors are ranked by fitness, such that the best reactor in the population. A depiction of that reactor's layout will appear on the screen. The grid that has been displayed is an X,Y slice of the reactor; the slider to its right controls the Z coordinate of the slice.
Please keep in mind that this is pre-alpha software that has been released to the public at no cost. Bugs are bound to happen. However, with that having been said, your feedback is greatly appreciated. Of particular need is power output statistics on any reactor configuration, include explicitly designed ones.
Regards,
-- ThyLordRoot, a player on wazuclan.to.us
Notes:
As many of us know, there are several subtle nuances that go into reactor design. It can be very taxing to scale reactor output with reactor dimensions. What's worse, one minor change results in a significant reduction in power production, making the debugging process a bit of a nightmare.
Fortunately, the world of biology has a solution for this. By using a process called a genetic algorithm and by entertaining the notion that reactors might be able to mate and have offspring, one is able to "breed" a population of reactors which approach optimal power output with each successive generation. This program essentially refines initially random reactor designs to meet some fitness function (by default, power generation), filtering out poorly performing reactors and preferring those with the highest yield.
If this sounds awesome to you, here's something even better: the program is both Free as in Beer and Free as in Freedom. The project, source code and all, can be found here: https://sourceforge.net/projects/reactorbreeder/. The more StarMade players can benefit from this, the better; the hope is that some day, you might get involved in improving this program, too!
Usage/Requirements:
This program requires Java JRE 1.7 to run. This should be no problem if you are running StarMade; you probably already have the prerequisites covered. Simply download the JAR (), or, if you do not trust the binary on SourceForge, review the source code and compile. There are two versions available:
- The current release. The current release is version of the program which is thought to work well. It can be found here: http://sourceforge.net/projects/reactorbreeder/files/dist-0.0.1/reactorbreeder-0.0.1.jar/download.
- The testing release. The testing release may contain features which are still under development. It can be found here: https://sourceforge.net/projects/reactorbreeder/files/dist-testing/
To begin using Reactor Breeder, you need to first create a population. Do so by using the File > Create... command. You will be presented with a dialog that allows you to enter your reactor dimensions and population size. Block dimensions can theoretically be up to some 2 billion cubed; however, more practically, this is limited by the amount of memory you have (for instance, a 100x100x100 reactor requires 1000 times more memory than a 10x10x10 one). You can also set the population size, which is the number reactors pitted against each at any given time. Once you are satisfied, click the "Create Button" and you can start the experiment.
The parameters (by default) are probably good enough to get started. However, if you want to play around with the options, these are the parameters:
- Mutation Rate - The number of changes to a child reactor outside of the consequences of mating.
- Crossover Rate - The relative genetic contribution of the "donor" parent to the child. The initial population of reactors is brought by the stork; however, after that, each new child has a "ma" and "pa" reactor. The child's initial genome is copied over from a random selection of either ma or pa. The child then randomly inherits configuration from the parent that was not selected for this (the donor) at the specified rate. Note that a reactor can mate with itself.
- Unfit rate - The number of reactors that will be weeded out by virtue of not being fit enough. These are systematically executed so that the fit reactors can mate and produce new offspring.
- Victim rate - The number of the remaining reactors (after removing unfit reactors) that will be removed due to unfortunate circumstances unrelated to fitness. In most cases, it's best to leave this at 0.
- Fitness function - The criterion for selecting fit reactors. Reactor Breeder will attempt to push this score as high as possible. By default, it is power generation.
- Epochs - The number of generations to run the simulation for. Each successive generation attempts to refine the population of the previous one, so a high value for this results in better reactors; however, if you are content with a suboptimal but "good" reactor, the default should be fine; after all, you might be trying to crank this out while you're playing Star-made.
Once you are ready, hit the "Start simulation" button to begin the vicious cycle of life. When the simulation is running, you can "cancel" the simulation at any point without losing your current progress. Regardless of how the simulation has ended, you can always restart the simulation without worrying about losing your progress; it will simply pick up where it left off.
Finally, you can view your reactors with the "Visualization". The reactors are ranked by fitness, such that the best reactor in the population. A depiction of that reactor's layout will appear on the screen. The grid that has been displayed is an X,Y slice of the reactor; the slider to its right controls the Z coordinate of the slice.
Please keep in mind that this is pre-alpha software that has been released to the public at no cost. Bugs are bound to happen. However, with that having been said, your feedback is greatly appreciated. Of particular need is power output statistics on any reactor configuration, include explicitly designed ones.
Regards,
-- ThyLordRoot, a player on wazuclan.to.us
Notes:
- Thanks to a generous donation of data from Lix, who has regen data up to reactors of block dimension 100, I might be able to get a much better regression model out of this. (see the relevant topic here: http://star-made.org/content/power-generation-cracking-code)