Artificial Intelligence Problem | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Artificial Intelligence Problem

can anyone help me solve this problem about some genetic algorithm in python, we have a knapsack problem, i barely need it coz its a part of our midterm project. Thanks in advance :)

26th Nov 2019, 12:40 AM
Shannen Andrea Cleofe
Shannen Andrea Cleofe - avatar
2 Answers
+ 3
I am not sure what sort of reaction you expect. Sounds a bit like you are not really willing to put any effort into this (you did not even give any details of the problem or where you are stuck with it). Please don't expect others to solve your homework. https://www.google.com/amp/s/www.geeksforgeeks.org/0-1-knapsack-problem-dp-10/amp/
26th Nov 2019, 5:28 AM
Tibor Santa
Tibor Santa - avatar
+ 3
Sort the items from high rewards to low, Push one by one until just before constraint breached.
26th Nov 2019, 6:21 AM
Gordon
Gordon - avatar