I'm working on an AI model that needs to efficiently assign jobs to workers depending on job.requiredResources and worker.totalResources`. When I say efficiently, I want it to reduce the amount of surplus to zero if possible.

surplus = sum(worker[i].totalResources) - job.requiredResources

Currently my model is able to assign jobs and workers using a stacked model of 2 NNs (brains).

Current GA settings:

  • Generations: 500
  • Population: 40
  • Mutation Rate: 0.2
  • Fitness function: accuracy of assignments with penalties for failure, None selections, and surplus

Some inputs:

  • list(availableJobs.requiredResources) -> fixed list composed of None values. When there are available jobs, None values are replaced by the job.requiredResources
  • list(availableWorkers.totalResources) -> fixed list composed of None values. When there are available workers, None values are replaced by the worker.totalResources

1st NN: Selects the Jobs

Inputs: list(availableJobs.requiredResources) + list(availableWorkers.availableResources)

HiddenLayers: 2 x 40 Neurons (testing testing)

Outputs: select from list(availableJobs) -> selectedJob

2nd NN: Selects Workers

Inputs: selectedJob.requiredResources, len(list(workersForJob)), list(availableWorkers), currentSurplusAmount

HiddenLayers: 2 x 40 Neurons (testing testing)

Outputs: select from list(availableWorkers) until surplus >= 0

Current results show that the model is assigning jobs to workers correctly, but the surplus is still very big. I am not sure how to lessen it.

Possible problems:

  • my math with regards to the resources
  • neural net structure
  • insufficient input (perceptors)
  • the net needs to be able to determine with that how big the deficit is and what's the best worker to assign to the job by taking the whole availableWorkers pool into consideration.

Has anyone else tried something like this? Maybe on a different use case? Will it be better to train one neural net first, then use the optimized version of that NN and then move on to the second neural net?

Please let me know if my question is not clear or if I need to show more info for context.

  • 1
    $\begingroup$ I might just go the route of making all outputs a yes/no answer and iterate over jobs and workers. inputs are greatly appreciated. $\endgroup$
    – Furankisan
    Jul 6 '17 at 19:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.