For questions related to fitness functions in the context of evolutionary computation and evolutionary algorithms. A fitness function is a function that assesses the quality (or fitness) of an individual (i.e. solution) in the population (in the case of population-based evolutionary algorithms).
Questions tagged [fitness-functions]
29 questions
8
votes
2 answers
How to create a good fitness function?
In genetic algorithms, a function called "fitness" (or "evaluation") function is used to determine the "fitness" of the chromosomes. Creating a good fitness function is one of the challenging tasks in genetic algorithms. How would you create a good…

Abbas Ali
- 566
- 3
- 10
- 17
6
votes
2 answers
Why does the fitness of my neural network to play tic-tac-toe keep oscillating?
I wrote a simple feed-forward neural network that plays tic-tac-toe:
9 neurons in input layers: 1 - my sign, -1 - opponent's sign, 0 - empty;
9 neurons in hidden layer: value calculated using ReLU;
9 neurons in output layer: value calculated using…

Perpetuum
- 61
- 2
5
votes
3 answers
Does gradient descent in deep learning assume a smooth fitness landscape?
I've come across the concept of fitness landscape before and, in my understanding, a smooth fitness landscape is one where the algorithm can converge on the global optimum through incremental movements or iterations across the landscape.
My question…

Joebevo
- 159
- 5
4
votes
1 answer
Can I compute the fitness of an agent based on a low number of runs of the game?
I'm developing an AI to play a card game with a genetic algorithm. Initially, I will evaluate it against a player that plays randomly, so there will naturally be a lot of variance in the results. I will take the mean score from X games as that…

Ryxuma
- 237
- 1
- 5
4
votes
1 answer
How do I use a genetic algorithm to generate the scores of an evaluation function for alpha-beta pruning?
I have created a Gomoku (5 in a row) AI using Alpha-Beta Pruning. It makes moves on a not-so-stupid level. First, let me vaguely describe the evaluation function of the Alpha-Beta algorithm.
When it receives a board as an input, it first finds all…

Dashadower
- 141
- 2
4
votes
1 answer
What is an appropriate fitness function for a simulated self-driving car?
I have been working for ages on a neuro-evolution AI program, where cars learn how to race around a track. Presently, I have a rudimentary fitness function that awards points for every degree traveled in the CW direction about the center of the…

Aniekan Umoren
- 51
- 5
4
votes
1 answer
How to improve the performance of my model trained with NEAT for a drone to learn how to fly?
I am working on a project in which a drone needs to learn how to fly. I am using NEAT.
For the first experiment, I want the drone to learn how to hover inside a $3 \times 3 \times 3$ meters box. My input is 6 sensors for each direction. The output…

smallbit
- 51
- 1
4
votes
0 answers
How to perform classification with NEAT-Python?
I am trying to do classification using NEAT-python for the first time, and I am having difficulty getting the accuracy rate. I tried the same problem with an ANN and was able to get a good accuracy rate (96%+), but NEAT-Python gives barely 40%.…

Linkuz
- 41
- 3
3
votes
2 answers
How to design a fitness function for the 8-queens problem?
In evolutionary computation and, in particular, in the context of genetic algorithms, there is the concept of a fitness function. The better a state, the greater the value of the fitness function for that state.
What would be a good fitness function…

Huma Qaseem
- 179
- 1
- 3
- 12
3
votes
1 answer
How do I design a fitness function that weighs the importance of eating food?
Summary:
I am teaching bots to pick food on a playing field. Some food is poisonous and some is good.
Food Details:
Poisonous food subtracts score points and good food adds.
Food points vary based on its size.
There is about 9:1 ratio of poisonous…

Alexus
- 236
- 1
- 8
3
votes
2 answers
How does adjusted fitness penalize large species in NEAT?
I'm learning about NEAT from the paper Evolving Neural Networks through Augmenting Topologies.
I'm having trouble understanding how adjusted fitness penalizes large species and prevents them from dominating the population, I'll demonstrate my…

wonder
- 31
- 1
3
votes
2 answers
Is it possible to perform neuroevolution without a fitness function?
My question is about neuroevolution (genetic algorithm + neural network): I want to create artificial life by evolving agents. But instead of relying on a fitness function, I would like to have the agents reproduce with some mutation applied to the…

LU15.W1R7H
- 41
- 3
2
votes
1 answer
How can a genetic algorithm adapt and get better in a changing environment?
I've just started studying genetic algorithms and I'm not able to understand why a genetic algorithm can improve if, at each learning, the 'world' that the population encounters change. For example, in this demo…

Giorgio Labate
- 23
- 3
2
votes
1 answer
Fitness function in genetic algorithm based on an interval
I am writing an app, where when a ball is shot from a canon it is supposed to land in a hole that is on a given distance. The ball is supposed to land between the distance of the beginning of the hole and the end of the hole. The size of the hole is…

ivaa14
- 21
- 1
2
votes
1 answer
Does pairing children with their parents cause any harm (in a genetic program)?
If you pair parents with their children (with a cross-over) does this prevent making individuals which are more fit or does this cause other side effects which are harmful to the genetic process?
I can provide any specifics about my concrete program…

SanThee
- 131
- 4