fliscopt icon indicating copy to clipboard operation
fliscopt copied to clipboard

Fix #FIX-NEEDED

Open Agrover112 opened this issue 4 years ago • 5 comments

👟 Reproduction steps

Implemented in: mulit_mutattion in ga_utils.py Can be tested by replacing mutation with multi_mutation in ga.py.

👍 Expected behavior

Mulit_mutattion in ga_utils.py should change N bits as selected. [1,2,3,4] for 2 bits could be: [1,3,3,5]

👎 Actual Behavior

Mulit_mutattion in ga_utils.py doesn't work as expected. Gives an Index Error when used , since the implementation is not correct.

👀 Have you spent some time to check if this issue has been raised before?

  • [X] I checked and didn't find similar issue

Agrover112 avatar Oct 01 '21 07:10 Agrover112

I went through the code for multi-mutation. The problem seems to be from the "gene" variable, can I get some sample test cases for running that specific function?

pratik1424 avatar Oct 04 '21 19:10 pratik1424

@pratik1424 Sure just look at the expected behaviour. It's supposed to edit multiple positions. So for ex [a,b,c,d], maybe the pos of the change is random between 0 and len(list)-1 , it could be anything from [a-/+1,b,c+/-1,d] like this!

Agrover112 avatar Oct 04 '21 19:10 Agrover112

Okay, I'll try something, I will open a PR after fixing the bug.

pratik1424 avatar Oct 05 '21 12:10 pratik1424

@pratik1424 Aare you working on it?

Agrover112 avatar Oct 09 '21 20:10 Agrover112

I tried a couple of different implementations, but the bug still persists. Main issue is the selection of gene2 and gene variables, I tried using numpy.random.uniform, but the bug remained.

pratik1424 avatar Oct 10 '21 16:10 pratik1424