[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #59299] Incorrect call to randi() in crossover
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #59299] Incorrect call to randi() in crossoverscattered() in GA package |
Date: |
Mon, 19 Oct 2020 03:55:50 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0 |
URL:
<https://savannah.gnu.org/bugs/?59299>
Summary: Incorrect call to randi() in crossoverscattered() in
GA package
Project: GNU Octave
Submitted by: None
Submitted on: Mon 19 Oct 2020 07:55:49 AM UTC
Category: Octave Forge Package
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect Result
Status: None
Assigned to: None
Originator Name: Ian Proudler
Originator Email: ikp1@f2s.com
Open/Closed: Open
Release: 5.2.0
Discussion Lock: Any
Operating System: GNU/Linux
_______________________________________________________
Details:
Octave Forge package ga v 0.10.1
Consider line 68 of crossoverscattered.m:
b(1:n_children, 1:nvars) = randi (1, n_children, nvars); ## TODO: test randi
The command 'help randi' says "Return random integers in the range
1:IMAX." thus line 68 returns a matrix of all ones.
The intention of line 68 is to return a matrix of ones and zeros, thus line 68
ought to be
b(1:n_children, 1:nvars) = randi (2, n_children, nvars) - 1;
As is 'crossoverscattered()' only selects one 'parent' for 'breeding' and
hence the genetic algorithm routine 'ga()' does not work properly.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?59299>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #59299] Incorrect call to randi() in crossoverscattered() in GA package,
anonymous <=