Questions tagged [fitness]

A fitness functions judges how good a solution of a problem is.

A fitness function is used to determine how well a solution fits a given problem. It is used in s.

104 questions
0
votes
1 answer

Why does my genetic algorithm return negative fitness values?

I'm trying to minimize the function and then graph it, but I'm getting negative fitness values and I don't know how or why. I'm using the GA package which basically handles the algorithm for me as long as I send it a fitness function. (documentation…
Robby
  • 165
  • 1
  • 11
0
votes
2 answers

How to clamp a value from 0 to infinite to a value from 1 to 0?

I am creating a program in Scala that needs to generate a fitness function based on the line that I provide it with. To generate the fitness function I wrote a method that takes a list of points and returns a fitness function based on those points.…
0
votes
3 answers

Java Fitness Function Not Working

I have a fitness function as part of a lab and wish to apply it to a set of 'weights' (ArrayList weights). I have created the array and stored some values in it. I have created random binary strings (which have an 'x' at the end in order to…
Mus
  • 7,290
  • 24
  • 86
  • 130
0
votes
4 answers

Java Fitness Function

I am having trouble getting the fitness function to work on my code. All that I end up with is the binary String "10101". I would greatly appreciate it if somebody could assist me as I have spent an extremely long time on this and not gotten…
Mus
  • 7,290
  • 24
  • 86
  • 130
0
votes
0 answers

Defining a fitness function in the genetic algorithm

I'm in the process of developing a simple application that uses the genetic algorithm for scheduling a timetable. I had a look at various examples and most of them appear to be using the algorithm to reach the initial specified solution in a various…
Al Capone
  • 17
  • 2
  • 5
0
votes
0 answers

Await must not be called on the UI thread when time is greater than zero

I am trying to use the fitness api for displaying last week's data on android but getting the following error: E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.admin.safely_counter, PID: 7435 …
Ayush Kshitij
  • 125
  • 2
  • 11
0
votes
0 answers

Fitness function for Maze Solving Genetic Algorithm

I am working on a Maze Solver using a GA approach. Each genome has directions encoded as chars ('N', 'S', 'E', 'W'), and each genome in the generation are evaluated for fitness and crossbreed using a weighted Roulette. The assignment is going…
old_dd
  • 135
  • 2
  • 13
0
votes
1 answer

Fitness function bottleneck resolution, C#

private void CalculateFitness(TimeTable timeTable) { int score = 0, DAYS_NUM = 5; score = timeTable.Exams.SelectMany(exam => exam.Students) .GroupBy(s => s) .Select(g => Connections(g.Count())) .Sum(); …
Romaine Carter
  • 637
  • 11
  • 23
0
votes
2 answers

Evolutionary Algorithm is not improving

Over the weekend I tried building a Neural Network, which improves using an evolutionary algorithm. I ran it for 5000 generations in the Cartpole environment of openai (https://www.openai.com/) but it doesn't improve really well. The Neural Network…
Kay Jersch
  • 277
  • 3
  • 13
0
votes
0 answers

Genetic algorithm not producing better results

I'm running a genetic algorithm to train a set of Hunters to learn to capture as many Elephants as possible. Basically, there's ~20 Hunters that move around in a 2D Grid environment, and 4 Hunters must surround an Elephant to capture it (there's ~20…
OMGitzMidgar
  • 689
  • 2
  • 10
  • 28
0
votes
1 answer

Do we actually test the 'Fixture' when using FitNesse?

This is more of a discussion I guess, and I would like to hear the opinions of others who use FitNesse. I'm quite new to FitNesse and was reading for last few days. I understand the concepts of the 'test wiki' and the 'Fixtures' and the test runs…
neo_er
  • 5
  • 1
  • 4
0
votes
0 answers

Genetic Algorithm Fitness Stop Increasing at Some Point

I am trying to implement a Genetic Algorithm which will recreate a given image by positioning, sizing and colouring 1000 circles. However, I found that when the fitness reaches a certain value (around 0.37 in my case) it stop increasing. In other…
hklel
  • 1,624
  • 23
  • 45
0
votes
3 answers

Genetic algorithm to solve a quadratic equation

I have a problem understanding the process for genetic algorithms. I found examples of maximizing a function over an interval, and I think I understand them, but how can a genetic algorithm be used to solve, for example, a quadratic…
Farzad
  • 1,770
  • 4
  • 26
  • 48
0
votes
1 answer

Objective function of a Genetic Algorithm

This is my first effort about AI/ML. I have the following problem given by my teacher, Design a simple genetic algorithm in MATLAB, with binary-coded chromosomes, in order to solve pattern finding problem in 16-bit strings. The objective…
user366312
  • 16,949
  • 65
  • 235
  • 452
0
votes
1 answer

Fitnesse not able to find fixture code

I am trying to run a simple test to check if i get the correct answer to the question "whether the number is even or odd" the FitNesse test case is like this- !define TEST_SYSTEM {slim} !path…
Shruti Seth
  • 147
  • 13