bugGNU Octave - Bugs: bug #59299, [octave forge] (ga) Incorrect call...

 
 

bug #59299: [octave forge] (ga) Incorrect call to randi() in crossoverscattered()

Submitter:  None
Submitted:  Mon 19 Oct 2020 07:55:49 AM UTC
   
 
Category:  Octave Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  lostbard
Originator Name:  Ian Proudler Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * other
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 12 Nov 2020 01:07:19 PM UTC, comment #2: 

Closing as fixed.

John Donoghue <lostbard>
Group Member
Mon 19 Oct 2020 11:14:09 PM UTC, comment #1: 
John Donoghue <lostbard>
Group Member
Mon 19 Oct 2020 07:55:49 AM UTC, original submission:  

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.


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by mmuetzel (Updated the item)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-11-12 lostbard StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2020-10-19 lostbard StatusNone Ready For Test
        Assigned toNone lostbard
    2020-10-19 mmuetzel Release5.2.0 other
        Operating SystemGNU/Linux Any
        SummaryIncorrect call to randi() in crossoverscattered() in GA package [octave forge] (ga) Incorrect call to randi() in crossoverscattered()

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code