Added modified versions of the script for finding optimal teammates.