added friendship and special condition
added "male ratio", and data editor interface
incorporated the gender ratio algorithm