Question: Solve this AI HOMEWORK task in C + + . Use only standart C + + libraries. Do not use libraries which will solve the
Solve this AI HOMEWORK task in C Use only standart C libraries. Do not use libraries which will solve the task automatically.A backpack with a capacity of MMM kilograms and NNN items is given, each characterized by two numbers weight mimimi and value cicici Using a Genetic Algorithm, select a set of items such that the total value is maximized, and the sum of weights does not exceed MMM For this task, the value of the current best configuration of items in the population should be output at least ten times.
For the first generation: At least intermediate generations of your choice the goal is to show how the algorithm optimizes The last generation.
NN N
The algorithm is expected to reach the optimal solution almost always for the given items in general, genetic algorithms do not guarantee finding an optimal solution, but with these data and the necessary settings, it should almost always achieve it
Your solution is expected to execute quickly within a few seconds, including printing the corresponding output.
Input:
MNM NMN
NNN rows defining mimimi and cicici
Output:
The maximum possible sum of values
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
