function load_knowledge() --Define Characters & Attributes characters = {}; characters["Hero"] = {name = "Hero", location = {30,27}, hp = 500, max_hp = 500, attack_power = 200, graphic_object = "HeroSprite"}; characters["Drakul"] = {name = "Drakul", location = {5,11}, hp = 3000, max_hp = 3000, attack_power = 50, graphic_object = "EnemySprite"}; characters["Lykanos"] = {name = "Lykanos", location = {5,20}, hp = 2000, max_hp = 2000, attack_power = 35, graphic_object = "EnemySprite"}; characters["Rat"] = {name = "Rat", location = {22,21}, hp = 700, max_hp = 700, attack_power = 10, graphic_object = "EnemySprite"}; characters["Scorpede"] = {name = "Scorpede", location = {9,6}, hp = 700, max_hp = 700, attack_power = 10, graphic_object = "EnemySprite"}; characters["Ant"] = {name = "Ant", location = {23,3}, hp = 700, max_hp = 700, attack_power = 10, graphic_object = "EnemySprite"}; --To satisfy a goal, the precondition must evaluate to "true" --The postcondition changes some world value goals = {} goals[1] = { name = "Defeat_Rat", target = Rat, desired_state = {{"Is_Alive", false}} } actions = {} actions[1] = { name = "Kill", action = "Kill", affected_state = {{"Is_Alive", false}}, required_state = {{"Is_Near", true}} } actions[2] = { name = "Move", action = "Move_to", affected_state = {{"Is_Near", true}}, required_state = nil } --Simple Structure of the Map in Aminus Dungeon walls = {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}, --1 {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 00, 00, 00, 26, 27, 28, 00, 00, 00, 32}, --2 {1, 2, 3, 4, 5, 6, 7, 8, 9, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 32}, --3 {1, 2, 3, 4, 5, 6, 7, 8, 9, 00, 11, 12, 13, 00, 15, 16, 17, 18, 19, 20, 21, 22, 00, 00, 00, 26, 27, 28, 00, 00, 00, 32}, --4 {1, 2, 3, 4, 5, 6, 7, 8, 0, 00, 00, 12, 13, 00, 15, 16, 17, 18, 19, 20, 21, 22, 23, 00, 25, 26, 27, 28, 29, 00, 31, 32}, --5 {1, 2, 3, 4, 5, 6, 7, 8, 0, 00, 00, 12, 13, 00, 15, 00, 00, 18, 19, 20, 21, 22, 23, 00, 25, 26, 27, 28, 29, 00, 31, 32}, --6 {1, 2, 3, 4, 5, 6, 7, 8, 0, 00, 00, 12, 13, 00, 00, 00, 00, 18, 19, 20, 21, 22, 23, 00, 25, 26, 27, 28, 29, 00, 31, 32}, --7 {1, 2, 3, 4, 5, 6, 7, 8, 9, 00, 11, 12, 13, 14, 15, 00, 00, 18, 19, 20, 21, 22, 00, 00, 00, 26, 27, 28, 29, 00, 31, 32}, --8 {1, 2, 3, 4, 5, 6, 7, 8, 9, 00, 11, 12, 13, 14, 15, 16, 17, 00, 00, 00, 00, 00, 00, 00, 00, 26, 27, 28, 29, 00, 31, 32}, --9 {1, 0, 0, 0, 0, 0, 0, 0, 9, 00, 11, 12, 13, 14, 15, 16, 17, 00, 19, 20, 21, 22, 00, 00, 00, 26, 27, 28, 29, 00, 31, 32}, --10 {1, 0, 0, 0, 0, 0, 0, 0, 9, 00, 11, 12, 13, 14, 15, 16, 17, 00, 19, 20, 21, 22, 23, 00, 25, 26, 27, 28, 29, 00, 31, 32}, --11 {1, 0, 0, 0, 0, 0, 0, 0, 9, 00, 11, 00, 00, 00, 00, 16, 17, 00, 19, 20, 21, 22, 23, 00, 25, 26, 27, 28, 29, 00, 31, 32}, --12 {1, 0, 0, 0, 0, 0, 0, 0, 9, 00, 00, 00, 00, 00, 00, 16, 00, 00, 00, 20, 21, 22, 23, 00, 25, 26, 27, 28, 29, 00, 31, 32}, --13 {1, 0, 0, 0, 0, 0, 0, 0, 9, 10, 11, 00, 00, 00, 00, 16, 00, 00, 00, 00, 00, 00, 23, 00, 25, 26, 27, 28, 00, 00, 00, 32}, --14 {1, 0, 0, 0, 0, 0, 0, 0, 9, 10, 11, 00, 00, 00, 00, 16, 00, 00, 00, 20, 21, 00, 23, 00, 00, 00, 00, 00, 00, 00, 00, 32}, --15 {1, 2, 3, 4, 0, 6, 7, 8, 9, 10, 11, 00, 00, 00, 00, 16, 17, 18, 19, 20, 21, 00, 23, 24, 25, 26, 27, 28, 00, 00, 00, 32}, --16 {1, 2, 3, 4, 0, 6, 7, 8, 9, 10, 11, 00, 00, 00, 00, 16, 17, 18, 19, 20, 21, 00, 23, 24, 25, 26, 27, 28, 29, 00, 31, 32}, --17 {1, 2, 3, 0, 0, 0, 7, 8, 9, 10, 11, 00, 00, 00, 00, 16, 17, 18, 19, 20, 21, 00, 23, 24, 25, 26, 27, 28, 29, 00, 31, 32}, --18 {1, 2, 3, 4, 0, 6, 7, 8, 9, 10, 11, 00, 00, 00, 00, 16, 17, 18, 19, 20, 21, 00, 23, 24, 25, 26, 27, 28, 29, 00, 31, 32}, --19 {1, 2, 3, 0, 0, 0, 7, 8, 9, 10, 11, 00, 00, 00, 00, 16, 17, 18, 19, 20, 21, 00, 23, 24, 25, 26, 27, 28, 00, 00, 00, 32}, --20 {1, 2, 3, 0, 0, 0, 7, 8, 9, 10, 11, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 24, 25, 26, 27, 28, 00, 00, 00, 32}, --21 {1, 2, 3, 0, 0, 0, 7, 8, 9, 10, 11, 00, 00, 00, 00, 16, 17, 18, 19, 20, 00, 00, 00, 24, 25, 26, 27, 28, 00, 00, 00, 32}, --22 {1, 2, 3, 0, 0, 0, 7, 8, 9, 10, 11, 00, 00, 00, 00, 16, 17, 18, 19, 20, 00, 00, 00, 24, 25, 26, 27, 28, 29, 00, 31, 32}, --23 {1, 2, 3, 4, 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 00, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 00, 31, 32}, --24 {1, 2, 3, 4, 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 00, 00, 00, 00, 00, 00, 21, 22, 23, 24, 25, 26, 27, 28, 29, 00, 31, 32}, --25 {1, 2, 3, 4, 0, 6, 7, 8, 9, 00, 11, 12, 13, 14, 15, 16, 17, 18, 19, 00, 21, 22, 23, 24, 25, 26, 27, 28, 00, 00, 00, 32}, --26 {1, 2, 3, 4, 0, 0, 0, 0, 0, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 21, 22, 23, 24, 25, 26, 27, 28, 00, 00, 00, 32}, --27 {1, 2, 3, 4, 5, 6, 7, 8, 9, 00, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 00, 00, 00, 32}, --28 {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}} --29 end