building custom individuals

50 views
Skip to first unread message

tom p.

unread,
Aug 15, 2018, 5:04:42 PM8/15/18
to deap-users
Hello All,

I have one case where I would like to generate individuals using a list of numbers such as [0, 10, 20, 30, 40, 50, 60, 70]
and another case where individuals have two values:

Hour: [5, 10, 15, 20, 25, 30] and Mode: [0, 1, 2, 3, 4].

Do I need to define my own mutation function, is there an easy way to define these individuals using existing the functions?


Many thanks.



Gao Shuhua

unread,
Aug 16, 2018, 6:28:46 AM8/16/18
to deap-users

Hi, Tom,

 

It is very straightforward to define such mutations. For example, you can just replace the current value with a randomly chosen one from [5, 10, 15, 20, 25, 30], or any proper list you like.

Gao Shuhua

unread,
Aug 16, 2018, 6:29:00 AM8/16/18
to deap-...@googlegroups.com

Hi, Tom,

 

It is very straightforward to define such mutations. For example, you can just replace the current value with a randomly chosen one from [5, 10, 15, 20, 25, 30], or any proper list you like.

 

 

Sent from Mail for Windows 10

 

From: tom p.
Sent: Thursday, August 16, 2018 5:04 AM
To: deap-users
Subject: [deap-users] building custom individuals

 

Hello All,

 

I have one case where I would like to generate individuals using a list of numbers such as [0, 10, 20, 30, 40, 50, 60, 70]
and another case where individuals have two values:

Hour: and Mode: [0, 1, 2, 3, 4].


Do I need to define my own mutation function, is there an easy way to define these individuals using existing the functions?

 

 

Many thanks.



--
You received this message because you are subscribed to the Google Groups "deap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to deap-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

 

Reply all
Reply to author
Forward
0 new messages