Add tutorial READMEs and fix tutorial return codes
Add README.md files for moeo/tutorial/Lesson{1-4}, smp/tutorial/Lesson{1-4},
and mo/tutorial/Lesson9 — these tutorials had no documentation.
Fix return 1 → return 0 in 28 tutorial main() functions across mo/ and
smp/ that unconditionally returned failure status.
This commit is contained in:
parent
54a44a177f
commit
c1a44fd2a6
37 changed files with 371 additions and 30 deletions
30
smp/tutorial/Lesson2/README.md
Normal file
30
smp/tutorial/Lesson2/README.md
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
# Homogeneous island model
|
||||
|
||||
Three islands running the same algorithm (`eoEasyEA`) with a complete
|
||||
topology — all islands exchange individuals with all others.
|
||||
|
||||
Same QAP problem as Lesson 1.
|
||||
|
||||
## Running
|
||||
|
||||
From the `build/smp/tutorial/Lesson2` directory:
|
||||
|
||||
```shell
|
||||
./lesson2_homogeneous
|
||||
```
|
||||
|
||||
The problem instance is loaded from `../lessonData.dat`.
|
||||
|
||||
## How it works
|
||||
|
||||
All islands share the same operators (evaluation, selection, crossover,
|
||||
mutation, replacement) but can have different parameters. The topology
|
||||
and island model are set up with:
|
||||
|
||||
```c++
|
||||
Topology<Complete> topo;
|
||||
IslandModel<Indi> model(topo);
|
||||
```
|
||||
|
||||
Each island gets its own population and generation limit, then the model
|
||||
runs them in parallel and handles migration.
|
||||
Loading…
Add table
Add a link
Reference in a new issue