Evolife
Evolife has been developed to study Genetic algorithms, Natural evolution and behavioural ecology.
|
A social individual has friends and can learn. More...
Public Member Functions | |
def | __init__ (self, IdNb, features={}, maxQuality=100, parameters=None, SocialSymmetry=True) |
Initalizes social links and learning parameters. More... | |
def | Reset (self, Newborn=True) |
called by Learner at initialization and when born again Resets social links and learning experience More... | |
def | reinit (self) |
called at the beginning of each year sets Points to zero and possibly erases social links (based on parameter 'EraseNetwork') More... | |
def | update (self, infancy=True) |
updates values for display More... | |
def | Interact (self, Partner) |
to be overloaded More... | |
def | assessment (self) |
Social benefit from having friends - called by Learning (to be overloaded) More... | |
Public Member Functions inherited from Evolife.Social.Alliances.Follower | |
def | __init__ (self, MaxGurus, MaxFollowers=0) |
calls the Friend constructor for followees. More... | |
def | F_affiliable (self, perf, Guru, G_perf, conservative=True) |
Checks whether affiliation is possible by checking acceptance both in friends and in followers. More... | |
def | F_follow (self, perf, G, G_perf, conservative=True) |
the individual wants to be G's disciple because of some of G's performance G may evaluate the individual's performance too More... | |
def | G_quit_ (self, Guru) |
the individual no longer follows its guru More... | |
def | F_quit_ (self, Follower) |
the individual does not want its disciple any longer More... | |
def | get_friend (self, Offer, Partner, PartnerOffer) |
Checks mutual acceptance and then establishes friendship. More... | |
def | end_friendship (self, Partner) |
Partners remove each other from their address book. More... | |
def | nbFollowers (self) |
def | follower_rank (self, Friend) |
Returns Friend's rank among self's followers. More... | |
def | forgetAll (self) |
calls 'detach' for self's followers and then for self. More... | |
def | detach (self) |
The individual quits its guru and quits its followers. More... | |
def | consistency (self) |
checks social links consistency (self belongs to the followers of its followees) More... | |
Public Member Functions inherited from Evolife.Social.Alliances.Friend | |
def | __init__ (self, MaxFriends=1) |
Defines Friend as a club. More... | |
def | accepts (self, F_perf) |
asymmetrical links # More... | |
def | affiliable (self, F_perf, conservative=True) |
Checks whether affiliation is possible. More... | |
def | follow (self, F, F_perf, conservative=True, Quit=None) |
the individual wants to be F's disciple due to F's performance More... | |
def | follows (self, Friend) |
checks whether Friend belongs to actual friends More... | |
def | quit_ (self, Friend=None) |
the individual no longer follows its friend More... | |
def | best_friend (self) |
def | Max (self) |
def | Friends (self, ordered=True) |
returns a list of friend names (possibly ordered by decreasing performance) More... | |
def | names (self) |
returns the list of friends' names More... | |
def | rank (self, Friend) |
returns the rank of Friend in the list of decreasing performances More... | |
def | nbFriends (self) |
Number of friends. More... | |
def | size (self) |
Number of friends. More... | |
def | sizeMax (self) |
def | lessening_friendship (self, Factor=0.9) |
all performances are reduced (represents temporal erosion) More... | |
def | checkNetwork (self, membershipFunction=None) |
updates links by forgetting friends that are gone More... | |
def | detach (self) |
The individual quits all its friends More... | |
def | acquaintable (self, Offer, Partner, PartnerOffer) |
symmetrical links # More... | |
def | get_friend (self, Offer, Partner, PartnerOffer) |
Checks mutual acceptance and then establishes friendship. More... | |
def | acquainted (self, Partner) |
same as get_friend/3 with no performance More... | |
def | end_friendship (self, Partner) |
Partners remove each other from their address book. More... | |
def | forgetAll (self) |
The individual quits its friends More... | |
def | __iter__ (self) |
def | __len__ (self) |
def | social_signature (self) |
returns the ordered list of friends More... | |
def | signature (self) |
same as social_signature More... | |
Public Attributes | |
Param | |
ID | |
Quality | |
Points | |
location | |
Public Attributes inherited from Evolife.Social.Alliances.Follower | |
followers | |
Public Attributes inherited from Evolife.Social.Alliances.Friend | |
friends | |
A social individual has friends and can learn.
Definition at line 85 of file SocialSimulation.py.
def Evolife.Social.SocialSimulation.Social_Individual.__init__ | ( | self, | |
IdNb, | |||
features = {} , |
|||
maxQuality = 100 , |
|||
parameters = None , |
|||
SocialSymmetry = True |
|||
) |
Initalizes social links and learning parameters.
Reimplemented from Evolife.Social.Alliances.Follower.
Definition at line 89 of file SocialSimulation.py.
def Evolife.Social.SocialSimulation.Social_Individual.assessment | ( | self | ) |
Social benefit from having friends - called by Learning (to be overloaded)
Definition at line 141 of file SocialSimulation.py.
def Evolife.Social.SocialSimulation.Social_Individual.Interact | ( | self, | |
Partner | |||
) |
to be overloaded
Definition at line 135 of file SocialSimulation.py.
def Evolife.Social.SocialSimulation.Social_Individual.reinit | ( | self | ) |
called at the beginning of each year sets Points to zero and possibly erases social links (based on parameter 'EraseNetwork')
Definition at line 117 of file SocialSimulation.py.
def Evolife.Social.SocialSimulation.Social_Individual.Reset | ( | self, | |
Newborn = True |
|||
) |
called by Learner at initialization and when born again Resets social links and learning experience
Definition at line 110 of file SocialSimulation.py.
def Evolife.Social.SocialSimulation.Social_Individual.update | ( | self, | |
infancy = True |
|||
) |
updates values for display
Definition at line 125 of file SocialSimulation.py.
Evolife.Social.SocialSimulation.Social_Individual.ID |
Definition at line 94 of file SocialSimulation.py.
Evolife.Social.SocialSimulation.Social_Individual.location |
Definition at line 132 of file SocialSimulation.py.
Evolife.Social.SocialSimulation.Social_Individual.Param |
Definition at line 92 of file SocialSimulation.py.
Evolife.Social.SocialSimulation.Social_Individual.Points |
Definition at line 107 of file SocialSimulation.py.
Evolife.Social.SocialSimulation.Social_Individual.Quality |
Definition at line 99 of file SocialSimulation.py.