Project Overview
This Artificial Intelligence (A.I.) will generate 25 teams of 100 people, from a set of 10,000 candidates, for a mission to colonize Mars. The A.I. makes use of a genetic algorithm to build and score potential teams based on technical skills along with personality types. I've incorporated results from the Myers & Briggs personality test to judge if teams will be likely to get along with each other on the long mission. These colonists will be isolated for an extended period of time with little to no contact with anyone else, which means they'll need to get along with each other in order to be successful. These colonists will also be millions of miles away from any sort of help if things don't go as planned, so it's important that the first colonists have the technical skill and knowledge to build and maintain a colony on an alien planet.
Genetic Algorithm
The A.I. will make use of a genetic algorithm to systematically generate and score teams. The genetic algorithm executes a loop with 4 stages
- Fitness
- Purge
- Reproduction
- Mutation
Each execution of the loop is called a generation. The algorithm keeps a population of 100 teams and the hope is that after each generation the majority of the teams become better. The algorithm also keeps 25 teams stored that represent the best teams generated over the course of the entire execution. Below I've documented each stage in more detail and explain how each stage contributes to building better teams over time.
Fitness
In the Fitness stage each team in the population will be scored. Teams are scored based on the technical skills of the individual team members as well as the personality types within each team. The scoring of teams allows the algorithm to identify which team compositions are successful and which compositions just aren't working out.
Technical Skills
Technical skills will be scored based on the necessity of the skill along with the demand for that skill. For example if there are already 10 Structural Engineers on the team having more would be a burden to the team so additional Structural Engineers will contribute less, or even contribute negatively, to the overall teams score. Right now the only hard requirements for technical skills are that each team must have at least one Doctor and one Psychiatrist.
Personality Types
Personality types will be determined by the Myers Briggs Test. The Myers Briggs Test will assign an individual one of 16 possible personality types and with each of those personalities there are a few other personalities they get along well with, and some that they get along poorly with (http://pstypes.blogspot.com/2009/03/myers-briggs-compatibility-part-1.html). Using this information each candidate will be assigned a personality type. Teams will increase their score if they have a large number of people whose personalities work well together and will decrease their score if a large number of people don't work well together. The only hard requirement for personality types is that each team must have a leader, this means at least one member of the team needs to have a personality type of ENTJ (https://www.saybrook.edu/rethinkingcomplexity/posts/08-11-14/what-personality-types-support-good-leadership).
Purge
During the Purge stage all teams with a negative score, meaning the team has zero chance of survival, will be removed from the population. After all negative scores have been removed the algorithm will start removing teams with the lowest scores. The algorithm will purge at least 20% of the population and at most 60%. Removing the least successful team compositions from the population allows the more successful teams to survive to the next generation and hopefully pass on the traits that have made them so successful.
Reproduction
The reproduction stage will replace all the teams we lost to the purge stage with new teams created from a mix of 2 other teams. Only the most successful teams will be allowed to reproduce with the hope that taking pieces of 2 teams will lead to an even better team in the next generation.
Mutation
In the mutation stage 20 individuals are chosen from each team in the population and they are each given a 10% chance to mutate. The mutation is to simply replace that person with another random person from the original candidate list. Mutation allows the algorithm to explore even more team compositions and will ensure the algorithm doesn't get stuck at any local maxim's.
Results
The following is some results after running the algorithm for an extended period of time. During that time the algorithm processed 10,000 generations. I've split the results into 3 phases to help show what was happening during that time.
This graph shows the results of the first 100 generations.
Since the algorithm begins with 100 randomly selected teams the scores rise very quickly once the algorithm starts applying logic to building teams. You can also see some places were the scores seem to level out and then suddenly jump up. This is most likely the result of some random mutation that brought the population out of a local maxima it had gotten stuck at.
The next 1,000 generations are steadily climbing in score. For the first 500 generations there is a steep increase in scores while the last 500 generations seem to get stuck at more local maxima. But again those random mutations eventually allow for jumps in scores followed by more linear progress.
This last graph shows the scores of the population from generation 1,000 to generation 10,000. You can see the while the first two graphs showed generally linear progression this graph seems to be more scattered, with scores fluctuating between 460 and 490. At this point it becomes very difficult for the algorithm to find better scores since almost any change or mutation will generate a lower score. This is good. This means that the population is being filled with very high scoring teams.
At the end of 10,000 generations I was left with 25 teams that all scored very highly and were very diverse in the way of team compositions. I believe this algorithm has accomplished the task it was designed to perform. In the future I will be adding a configuration file so you can dynamically alter how the algorithm scores teams. For example you can choose to weigh Mechanical Engineers higher than Biologists so you'd end up with teams that tend to have more Mechanical Engineers. This will allow anyone to generate teams based on their specific needs.
The Why
Selecting 100 people for a mission to colonize Mars is a daunting task. The exhaustive method would be to select several hundred people and put them through rigorous and prolonged testing and slowly weed people out until only 100 are left. By using this A.I. you will be presented with a smaller subset of possible teams that are already optimized.