Skip to main content
Stack Overflow for Teams is now Stack Internal: See how we’re powering the human intelligence layer of enterprise AI. Read more >
Filter by
Sorted by
Tagged with
-2 votes
1 answer
56 views

I'm using genetic algorithm for knapsack problem and when I wanted to debug it says : int' object is not subscriptable it just pointed this 3 spots in the code and in the end it just said this is the ...
user10422605's user avatar
0 votes
1 answer
29 views

I am running into a problem when trying to print the "best" decision variable values based on a certain case (that the one objective is less than 1). I am using the NSGA-II algorithm from ...
Butch Strasheim's user avatar
1 vote
1 answer
86 views

I coded a Genetic Algorithm in Python using the DEAP library to solve a modified TSP problem, where the evaluation function is: def evaluate(self, individual: list[int]) -> float: ...
lovethefrogs's user avatar
0 votes
0 answers
72 views

I've been coding a Genetic Algorithm to solve TSP using python's DEAP library. I've implemented my own Graph class, and an Algorithm class that runs the GA on a Graph instance. However, when adding ...
lovethefrogs's user avatar
0 votes
0 answers
35 views

I am working with machine learning using pytorch. There is some class implementing neural network inherited from nn.Module. Some network structure is implemented. There are different parameters (...
Oleksandr N.'s user avatar
0 votes
1 answer
132 views

To set up my differential_evolve curve-fit function, I borrowed heavily from https://bitbucket.org/zunzuncode/ramanspectroscopyfit/src/master/RamanSpectroscopyFit.py. My implemented function works ...
onix's user avatar
  • 3
0 votes
0 answers
23 views

The context is the initialization of optimization algorithms (for example, differential evolution), where we generate a random population of vectors that represent the solution's parameters. We are ...
mariolpantunes's user avatar
1 vote
1 answer
150 views

I have an optimization problem with a lot of variables. Let suppose there is just three: car speed (km/h), car weight (tons) and car price ($). Obviously, the range of each variable is different: car ...
Felipe Matilde's user avatar
2 votes
1 answer
118 views

I have a genetic algorithm problem but I'm stuck in local optimum. As you can see in the snippet, it simply can't solve the problem, no matter how many gens or genomes I add to the generation. Code: ...
Adrian's user avatar
  • 39
0 votes
0 answers
48 views

I’m working on a genetic algorithm for an optimization task where I need to compare different parameters across three functions, including: Crossover: One-point (OT), two-point (DT) Mutation rates: 0....
blulow's user avatar
  • 41
2 votes
1 answer
110 views

I am trying to allocate Kubernetes pods to nodes using a genetic algorithm, where each pod is assigned to one node. Below is my implementation: from string import ascii_lowercase import numpy as np ...
AndCh's user avatar
  • 339
-1 votes
1 answer
111 views

I have a really big (exponential) search space for a problem, and as such i've been attempting to use genetics/evolution to find the approximate best solution, however I'm extremely inexperienced on ...
Fabricio20's user avatar
3 votes
0 answers
102 views

I've successfully built my model and it runs and plots a Pareto front. However, I don't know how to store X* (the optimum value of ALL the decision variables that resulted in the optimum F). My model ...
shayan firouzian's user avatar
0 votes
1 answer
31 views

I m trying to perform optimisation in MAtlab to obtain the best set of car following parameters of Weidmann 99 model. The code is as follows :function optimize_vissim_params() % Lower and upper ...
Shekhar Singh's user avatar
1 vote
2 answers
68 views

I'm trying to implement Genetic Algorithm to get from point A to point B by car in python. So it's more like a proof of concept. import sys import math import random POPULATION_SIZE=10 GENE_LENGTH=10 ...
5tack's user avatar
  • 21
1 vote
0 answers
47 views

I have created a program that learns how to play connect4 using a neural network and genetic algorithms. It starts with random weight neural networks, lets every network play against each of the other ...
AJ222's user avatar
  • 1,134
1 vote
1 answer
89 views

Is it possible to solve a linear problem using the pulp library to create decision variables and write fitness functions and penalties using the Pypi genetic algorithm library? I have done this, but ...
sina's user avatar
  • 11
3 votes
0 answers
78 views

I'm trying to implement the NSGA-II to solve multi objective optimization problems, I think my implementation is correct but it is very unstable, DLTZ1 is supposed to be not that hard to solve but if ...
Cuchisius's user avatar
2 votes
0 answers
62 views

I'm trying to use an simple genetic algorithm with only one goal, however my problem is kinda of complex. So, I have an initial chromosome that will have to be made up of 2 or more groups that also ...
Isabel Castro's user avatar
-1 votes
1 answer
80 views

I hope you are doing well. I am writing a simple genetic algorithm in Java. However, I am encountering an issue with elitism. When I try to preserve the best individuals, I observe abnormal behavior ...
Sermad SAAD's user avatar
1 vote
1 answer
114 views

I am not understanding what will be my fitness function for regression problem.basically i have 1000 datasets with input shape (72,2) and 1000 output dataset (72,4).I want my model to be trained with ...
Sadia Ferdous Snigdha's user avatar
0 votes
0 answers
72 views

How could I gather data for an experiment solving the traveling salesman problem by comparing ant colony optimization to genetic algorithms in terms of efficiency? Are there any recommended tools? My ...
Zahra Zams's user avatar
1 vote
0 answers
49 views

I am using matlab's optimization toolbox to find the maximum of a function I am calculating numerically/do not have a closed form for. My two inputs are arrays of binary values, and a genetic ...
Schrodinger1933's user avatar
0 votes
1 answer
61 views

I've been trying to implement simple Gen. Algorithm but I can't wrap my head around splitting up an array into pieces and assigning that to the new array. My problems: 1.I don't know how to split rows ...
pkrzysiek's user avatar
0 votes
0 answers
354 views

I am trying to develop an algorithm for two dimensional cutting stock problem, but it should also be able to calculate the number of boards to cut from. Here is an example: Base boards are all the ...
Lana's user avatar
  • 9
0 votes
0 answers
34 views

if I have a chromosome =[1.01, 2.03, 4.06, 6.03, 0, 5.06, 4.12, 0, 3.03, -1, 1.12, 10.01, 4.05, 8.05, 3.07, 5.08, -1, 7.10, 8.01]; how can I separate it into segments using -1 gene and -1 will be ...
Shaimaa Elattar's user avatar
1 vote
0 answers
73 views

I'm playing with Matlab's Global Optimization Toolbox and learning about genetic algorithms. My goal is to implement an algorithm that can navigate in 2D space, searching for the shortest path from a ...
Tsidia's user avatar
  • 13
1 vote
1 answer
88 views

I have a data frame: prod_id timestamp1 timestamp2 1 2023-12-02 2023-12-01 2 2023-12-05 ...
french_fries's user avatar
  • 1,199
2 votes
0 answers
121 views

I'm attempting to build a CNN deep learning model utilizing a genetic algorithm to learn on CIFAR-10. I have so far found a few libraries, but I have mainly encountered pyGAD and some derivatives ...
Divinor's user avatar
  • 77
0 votes
0 answers
42 views

For the mutation probability, the definition I found is "Mutation probability (or ratio) is basically a measure of the likeness that random elements of your chromosome will be flipped into ...
laikaka's user avatar
  • 49
-1 votes
1 answer
126 views

This is a real world problem that has been solved in the past via thousands of manual iterations. Please forgive my inexperience with stackoverflow and with how to format my question. Dave, I believe ...
QuickBrownFox's user avatar
0 votes
1 answer
26 views

I'm create this code but now I need select parents using the tournament selection and if I enter an odd number like 5 the program don't should give me 5 parents should give me 4 parents this is what I ...
samuel valladares's user avatar
0 votes
1 answer
66 views

So I am just trying to extra 100 different stocks from YH using yfR and quantmod then calculate the daily returns for these stocks (eventually I will use this data to calculate the mean daily returns ...
Cal's user avatar
  • 11
0 votes
0 answers
53 views

Abstracts I am currently developing a program that uses a genetic algorithm to solve a combinatorial optimization problem. The objective is to select a control group of 2000 people from 5000 people ...
Yosuke's user avatar
  • 1
0 votes
0 answers
86 views

I'm using the geneticalgorithm2 module for minimization. I use mixed variables and my code is similar to the example given by them: import numpy as np from geneticalgorithm2 import geneticalgorithm2 ...
Fish1996's user avatar
  • 567
1 vote
1 answer
303 views

I am trying to implement 8 queens problems in c++. This is my code #include <iostream> #include <stdlib.h> #include <time.h> #include <vector> #include <algorithm> #...
Hrach Harutyunyan's user avatar
-1 votes
1 answer
68 views

I started in the last days of 2023 a personal project just for fun - I recreated the classical "Snake Game" (from old Nokia mobiles) in Python and I wanted to integrate it with some Machine ...
Matheus Felipe's user avatar
0 votes
0 answers
123 views

I am doing small coding on Genetic Algorithm and the below is my main function : #include <stdio.h> #include <stdlib.h> #include <time.h> #include <mpi.h> #include <limits.h&...
toughcoding's user avatar
0 votes
0 answers
506 views

I'm working on a project related to solving the job shop scheduling problem using Tabu search, genetic algorithms, or any suitable algorithm in Python. I've referred to this GitHub repository: https://...
bachphan0201's user avatar
1 vote
1 answer
363 views

I am using Pygad to compute an optimization problem, however the algorithm is reaching local minima (not the ideal solution) before all the generations have run. I would like to be able to check ...
Glen Eaton's user avatar
0 votes
0 answers
48 views

If 100 assignment operations m=n are performed in 1 second, then how many operations n^2 and 2^n will be performed in a second? It seems to me that it is necessary to perform an operation that is the ...
PepeChill's user avatar
0 votes
0 answers
89 views

I'm looking for some advice for an optimization problem regarding scheduling jobs in a datacenter. So I have a list of jobs and each job has a required time for finishing and a number of cores it has ...
Konstantin's user avatar
0 votes
1 answer
277 views

I learning genetic algorithms with DEAP and i want to animate how the best individual changes in each generation. For it i use class Statistics and Multistatistics: stats = tools.Statistics(lambda ind:...
Vya4eslav's user avatar
0 votes
1 answer
475 views

I have been working with the mealpy Python library for quite some time-- the repository of around 200 metaheuristic algorithms including GA, DE, ACO, PSO, ...authored by Nguyen Van Thieu, alias ...
Partha D.'s user avatar
  • 326
0 votes
1 answer
833 views

I am need of a help. My code is to maximize the profit and minimize the area, which is the sum of Xs. The X are the áreas, and 4 of them are free to use, and the other 4 have a cost to use, and have ...
Rafael Henrique's user avatar
0 votes
1 answer
91 views

I am trying to use the following function to make mutation step in agametic algorithm. Unfortunately, I have got an error as follows: IndexError Traceback (most recent ...
Esra's user avatar
  • 23
0 votes
1 answer
157 views

I am trying to optimize a large Excel model using Pymoo, I have set up the problem to communicate with Excel via pyWin32. During debugging in VSCode, I get the following exception: Exception ('Problem ...
JT269's user avatar
  • 3
0 votes
1 answer
427 views

I am trying to setup a differential_evolution algorithm. I have approximately 15 variables, each with its own bounds (let's suppose they all share the same bounds (150,250). I have successfully ...
Sala's user avatar
  • 480
0 votes
1 answer
479 views

I have a problem with two objectives. The problem is minimized by NSGA-2 algorithm. I run minimize with different population sizes and different termination criterias, but every time the algorithm ...
iammetehan's user avatar
0 votes
1 answer
80 views

I have a .csv file with 5 inputs and 1 ouput. How can I optimize the output via the use of Genetic Algorithms? Many people that have written a tutorial online do not give instructions on problems such ...
nobody's user avatar
  • 475

1
2 3 4 5
42