diff --git a/virtupet/Pudgi.py b/virtupet/Pudgi.py index d875b32..ec5c22b 100644 --- a/virtupet/Pudgi.py +++ b/virtupet/Pudgi.py @@ -334,3 +334,13 @@ def select_parents(active_agent_list): parents.append((high_happiness.pop(), high_happiness.pop())) return parents + + def make_decicion(self): + self.handler.load_file("./data/decisions.py") + decision_file = self.handler.get_data() + self.handler.load_file("./data/pudgi" + self.uid + ".json") + pudgi_file = self.handler.get_data() + + if (random.random() > 0.5): + for decision in self.known_decisions: + name = decision["name"] diff --git a/virtupet/costs.py b/virtupet/costs.py deleted file mode 100644 index 763e0e9..0000000 --- a/virtupet/costs.py +++ /dev/null @@ -1,3 +0,0 @@ -# costs - -VITALITY, MENERGY, PENERGY = range(3) diff --git a/virtupet/data/decisions.json b/virtupet/data/decisions.json index 1451761..b51bc7b 100644 --- a/virtupet/data/decisions.json +++ b/virtupet/data/decisions.json @@ -1,4 +1,4 @@ -{"decisions": [ +[ {"name": "roll_ball", "values": {"attachment": 0.2, "humor": 0.3, @@ -32,7 +32,7 @@ "excitement": 0.9, "confidence": 0.1, "contentment": 0.7, - "entertainment": 0.5, + "entertainment": 1, "vitality": -0.7, "mental_energy": -0.5, "physical_energy": 0.3 @@ -87,7 +87,20 @@ "vitality": 0.1, "mental_energy": 0.6, "physical_energy": 0.3} + }, + { + "name": "nothing", + "values": { + "attachment": 0.1, + "humor": 0.1, + "enjoyment": 0.1, + "excitement": 0.1, + "confidence": 0.1, + "contentment": 0.1, + "entertainment": 0.5, + "vitality": -0.1, + "mental_energy": -0.1, + "physical_energy": -0.1 } } - ] -} +] diff --git a/virtupet/data/pudgies/0x1607.json b/virtupet/data/pudgies/0x1607.json new file mode 100644 index 0000000..5fa75a5 --- /dev/null +++ b/virtupet/data/pudgies/0x1607.json @@ -0,0 +1,148 @@ +{ + "uid": "0x1607", + "name": "Haiden", + "dna": [ + 1, + 0, + 1, + 0, + 1, + 1, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 1, + 1, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 1, + 1, + 0, + 1, + 1 + ], + "color": "Blue", + "personality": "ISFP", + "parents": [ + null, + null + ], + "happiness": 0.5, + "known_decisions": [] +} \ No newline at end of file diff --git a/virtupet/data/pudgies/0xf1f.json b/virtupet/data/pudgies/0xf1f.json new file mode 100644 index 0000000..fefea16 --- /dev/null +++ b/virtupet/data/pudgies/0xf1f.json @@ -0,0 +1,148 @@ +{ + "uid": "0xf1f", + "name": "Leah", + "dna": [ + 1, + 0, + 0, + 1, + 0, + 0, + 1, + 1, + 0, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 0, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 1, + 1, + 1, + 0, + 1, + 0, + 1, + 0, + 1, + 1, + 0, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 1, + 0, + 1, + 0, + 1, + 0, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 1, + 1, + 1, + 0, + 0, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 0, + 0, + 1, + 0, + 0, + 0, + 1, + 1, + 1, + 0, + 0, + 1 + ], + "color": "Midnight", + "personality": "ISFP", + "parents": [ + null, + null + ], + "happiness": 0.5, + "known_decisions": [] +} \ No newline at end of file diff --git a/virtupet/decisions.py b/virtupet/decisions.py deleted file mode 100644 index 6a676d3..0000000 --- a/virtupet/decisions.py +++ /dev/null @@ -1,45 +0,0 @@ -# This file contains all of the information on the decision heuristics -import motivations -import costs - - -# class Decision: -# -# def __init__(self): -# -# # define motivators -# self.attachment = None -# self.wattachment = None -# -# self.humor = None -# self.whumor = None -# -# self.enjoyment = None -# self.wenjoyment = None -# -# self.excitement = None -# self.wexcitement = None -# -# self.confidence = None -# self.wconfidence = None -# -# self.contentment = None -# self.wcontentment = None -# -# # define costs -# self.vitality = None -# self.wvitality = None -# -# self.physical_energy = None -# self.wpenergy = None -# -# self.mental_energy = None -# self.wmenergy = None -# -# # define entertainment -# self.entertainment = None -# -# def weight(self, heuristic, weight): -# if heuristic == motivations.ATTACHMENT: -# self.wattachment = weight - diff --git a/virtupet/motivations.py b/virtupet/motivations.py deleted file mode 100644 index becd0a5..0000000 --- a/virtupet/motivations.py +++ /dev/null @@ -1,3 +0,0 @@ -# motivations - -ATTACHMENT, HUMOR, ENJOYMENT, EXCITEMENT, CONFIDENCE, CONTENTMENT, ENTERTAINMENT = range(7)