2,086 questions
-2
votes
1
answer
56
views
I want to fix a "int' object is not subscriptable" error [closed]
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 ...
1
vote
1
answer
88
views
Why does this Genetic Algorithm give such bad solutions to a TSP?
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:
...
0
votes
0
answers
36
views
How to calculate neural net for different weights and inputs in parallel in pytorch?
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 (...
0
votes
0
answers
23
views
Algorithm to find the set of K solutions candidates based on two criteria
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 ...
2
votes
1
answer
118
views
How to solve genetic algorithm stagnation in the Zen garden problem?
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:
...
2
votes
1
answer
110
views
Genetic algorithm for kubernetes allocation
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
...
3
votes
0
answers
102
views
Finding the optimum value of all Decision Variables in a MixedVariable problem with Pymoo
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 ...
1
vote
2
answers
68
views
Genetic Algorithm - car trajectory
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 ...
1
vote
1
answer
90
views
genetic optimizer using pulp library
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 ...
2
votes
0
answers
63
views
Can a genetic algorithm give an variable sized solution?
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 ...
1
vote
1
answer
114
views
firness function of multi output pygad
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 ...
1
vote
0
answers
49
views
Matlab Optimization Solver not Applying Options or Converging (Genetic Algorithm)
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 ...
0
votes
0
answers
358
views
How to approach cutting stock problem that minimises waste and calculates the number of borads to use for cutting
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 ...
1
vote
0
answers
73
views
Matlab's genetic algorithm ignores obstacle when pathfinding in 2D space
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 ...
2
votes
0
answers
121
views
How to convert CIFAR-10 to a tensor object
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 ...
-1
votes
1
answer
127
views
Assistance formatting and solving a very large system of equations problem
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 ...
0
votes
1
answer
66
views
How do I exclude missing entries when using quantmode getSymbols() in R?
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 ...
0
votes
0
answers
86
views
Python geneticalgorithm2 bounds with stepsize
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 ...
-1
votes
1
answer
68
views
Suggestions about optimal way to run neural networks in parallel
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 ...
0
votes
0
answers
506
views
job shop scheduling using python
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://...
0
votes
0
answers
48
views
Theory of algorithms and counting the number of operations
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 ...
0
votes
1
answer
277
views
Get the best individual in each generation with DEAP
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:...
0
votes
1
answer
835
views
How select a first population from my code in Pymoo
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 ...
0
votes
1
answer
158
views
Single objective multiple integer variable optimisation of an Excel model - Python Pymoo library
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 ...
0
votes
1
answer
479
views
Couldn't get more than two solutions in pymoo
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 ...