Output of candidate solution

12 lượt xem
Chuyển tới thư đầu tiên chưa đọc

bhi...@gmail.com

chưa đọc,
12:11:26 4 thg 2, 20204/2/20
đến Inspyred
https://pythonhosted.org/inspyred/tutorial.html#the-evolutionary-computation

I was looking at the output of this section. Given an input size of 3, why are there 6 outputs in the candidate. If i tried changing the number of inputs, it is always double that of the input size.

Below is an example of the output for a size 3,

$ python rastrigin.py
[1.0591544744884256, -0.06931594194249761, 2.014420132288964, 2.4373871664313254, 0.9287429640850096, 1.4371661116043493] : 3.83332404535

The first 3 contribute to the last value(objective value) but i would like to know what are the remaining 3 numbers

Aaron Garrett

chưa đọc,
12:15:59 4 thg 2, 20204/2/20
đến Inspyred
The evolution strategy (ES) adds a strategy parameter for each element of the candidate solution: https://pythonhosted.org/inspyred/reference.html#inspyred.ec.ES

--
Aaron Garrett



--
You received this message because you are subscribed to the Google Groups "Inspyred" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inspyred+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inspyred/4d90cb0d-ba37-4914-8f94-e6782c7b70d1%40googlegroups.com.

bhi...@gmail.com

chưa đọc,
22:09:51 16 thg 2, 202016/2/20
đến Inspyred
def my_variator(random, candidates, args):
    mutants = []
    for c in candidates:
        points = random.sample(range(len(c)), 2)
        x, y = min(points), max(points)
        if x == 0:
            mutants.append(c[y::-1] + c[y+1:])
        else:
            mutants.append(c[:x] + c[y:x-1:-1] + c[y+1:])
    return mutants


https://pythonhosted.org/inspyred/examples.html#custom-variator

In that example, when you reverse the order of some of the bits, wouldn't there be a case were part of the stratergy parameters are moved into the first half of the solution which was the actual candidate solution?


On Tuesday, 4 February 2020 12:15:59 UTC-5, Aaron Garrett wrote:
The evolution strategy (ES) adds a strategy parameter for each element of the candidate solution: https://pythonhosted.org/inspyred/reference.html#inspyred.ec.ES

--
Aaron Garrett



On Tue, Feb 4, 2020 at 12:11 PM <bhi...@gmail.com> wrote:
https://pythonhosted.org/inspyred/tutorial.html#the-evolutionary-computation

I was looking at the output of this section. Given an input size of 3, why are there 6 outputs in the candidate. If i tried changing the number of inputs, it is always double that of the input size.

Below is an example of the output for a size 3,

$ python rastrigin.py
[1.0591544744884256, -0.06931594194249761, 2.014420132288964, 2.4373871664313254, 0.9287429640850096, 1.4371661116043493] : 3.83332404535

The first 3 contribute to the last value(objective value) but i would like to know what are the remaining 3 numbers

--
You received this message because you are subscribed to the Google Groups "Inspyred" group.
To unsubscribe from this group and stop receiving emails from it, send an email to insp...@googlegroups.com.

Aaron Garrett

chưa đọc,
22:15:14 16 thg 2, 202016/2/20
đến Inspyred
Yes. That example assumes you just have a bitstring encoding (as in a canonical GA). Operators are always tied in some way to the encoding. Not every operator will work with an ES (if that's what you've decided to use). The examples should be treated as intuition pumps; they can't necessarily be used verbatim in a particular problem.

--
Aaron Garrett



To unsubscribe from this group and stop receiving emails from it, send an email to inspyred+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inspyred/64adb416-abac-434e-9cb8-e4cb4829f5ef%40googlegroups.com.
Trả lời tất cả
Trả lời tác giả
Chuyển tiếp
0 tin nhắn mới