A simulation of how philosophy affects history of a civilization