Development of a fitness function in a genetic algorithm

I need to solve simultaneous linear equations (5 equations with 7 unknowns, that is, an uncertain problem), where the variables vary over a wide range [0 - 1,000,000]. Can anyone suggest which fitness function I should use?

+3
source share
2 answers

I assume that you are referring to a system of 5 linear equations with 7 variables.

This article seems to show what you are looking for. You basically need to define a cost function and use GA to minimize it. Search the “fitness function” pdf for instructions on how to do this. The idea is to determine how well your set of variables approximates the solution (or solution in your case) for the system.

+1
source

Assuming your system is written in this form: e_1 (x1, x2, ..., x7) = 0 e_2 (x1, x2, ..., x7) = 0 ... e_5 (x1, x2, ... , x7) = 0

F (x1, x2,..., x7) = abs (e_1 (x1,..., x7)) + abs (e_2 (x1,..., x7) +... + abs (e_5 (x1,..., x7) . , + - (, , , @JohnIdol)

, , .

+1

Source: https://habr.com/ru/post/1763028/


All Articles