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 mim_imi and value cic_ici. 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 8 intermediate generations of your choice (the goal is to show how the algorithm optimizes). The last generation.
N<10,000N <10,000N<10,000
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:
M,NM, NM,N
NNN rows defining mim_imi and cic_ici
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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!