PhD Progress: Automatic Environment Learning
Posted by Sam on September 2nd, 2010 under PhD Project • No Comments
I have recently been working on a mutation operator which creates new rules using the known predicates of the environment. For instance, adding cl(X) to a rule not already containing cl(X) but does mention this X. However, a problem this process introduces is the problem of creating rules which are differing duplicates (essentially are the same rule, but are worded differently, such as the on(X,Y) -> B and on(X,Y) & abv(X,Y) -> B case) and creating completely useless rules (on(X,Y) & onFl(X) -> B case). Furthermore, this process can intrtoduce negation, so that needs to be accounted for as well.
I have so far got around this by using existing background knowledge to check rules, and also introducing a new form of background knowledge (well it is still the same) which isn’t evaluated by the JESS compiler, but is still a valid and legal rule for the environment. However, as I wrote up these rules, I realised that I am essentially telling the agent the dynamics of the environment, which a smarter planning agent could use to achieve its needs. Which isn’t really a bad idea at all, perhaps something I’ll check out later. Anyway, I thought of a new agent measure to learn the environment,
Because the agent can spend so much time in the environment, it should be able to learn the dynamics of the environment by itself, and learn which conditions are always together, and which are apart. By allowing the agent to learn the environment, this means that every background knowledge rule doesn’t have to be declared by the environment designer, only the ones that are required for asserting predicates automatically need be.
The problem this task faces is firstly extra overhead, but as all of the data about the state has already been collected, the agent need only sort and check it against its current beliefs of the environment’s structure. The second problem is deciding when to stop checking the environment. Because the agent only checks the environment for the first few episodes (for covering purposes), it may find its belief’s of the environment to be short-sighted. Like many learning mechanisms of the agent, it may just have to be settled after a number of episodes or something and only forcefully checked when the agent covers new rules and maybe for the first few pre-goal states.
This learning mechanism may have the capability of learning major shifts in the environment, but for now it can just learn constant rules for the entire environment.
The mechanism operates by maintaining three lists for each (non-type) condition: sometimes true, never true, and always true (Both, False, True). Whenever the agent encounters a state, it evaluates the conditions and their relation against other conditions (with each condition in simplified variable form). So initially, after one state has been seen, all currently true conditions are in the True list and all other conditions in the environment are in the False list. For each state seen after this, conditions in either list can either stay where they are, or shift to Both list. Eventually, after a number of states, the observed behaviour will be stabilised for X steps (and have seen Y pre-goals), so the agent can actively scanning the state and focus on learning which rules work.
There is a natural bonus to this system as well. I’m still not 100% sure if it’s foolproof (I’m sure any logical programming book will be able to confirm it for me), but the system of implication allows conditions to be more quickly spread across other conditions. For example, highest(X) -> clear(X), and clear(X) -> !on(?,X). Therefore, highest(X) -> !on(?,X). This may just be learned automatically anyway, but it may be beneficial to be aware of this.
This mechanism can be built into the existing covering class (as a separate class) which could be merged with the known ranges member. Ranges could be a problem too…
D&D – Multi-Culture Pals: Labyrinthian Underground
Posted by Sam on August 30th, 2010 under D&D • No Comments
While I found this part of our adventure homely and comfortable, I also found it reminded me of my enslavement to those mudapes deep within their mountain fortress. For more than 15 long years those vile creatures worked me, beat me and barely fed me. I will one day return the favour to them, when I find where they have finally gone to.
Before we went further underground, we had to first cross the river an Emerald Claw had escaped across. He must have had magical aid to get across these rapids, as when Dorfel entered them earlier he was quickly swept away. Cecilia was able to grant aid in the form of a water-walking ritual, which we had Dorfel use to take a rope across. Each of our crossings were uneventful, but the elf and halflings were not so lucky. One halfling was swept downriver, and two others nearly lost to the rapids. Yet Daren, the elf, seemed not to care much. Doesn’t inspire camaraderie to my eyes.
After heading down some stone stairs, following the Emerald Claw’s trail, we found ourselves in a luminous room, with several doors. The first, and most obvious, was a wooden one which had been recently disturbed. Of the other two, one was of strange, alien unbreakable rock and the other was very well concealed. Deciding that the concealment was for a reason, and because Cecilia was blasted into the room due to a reaction from attacking the alien rock, we investigated the room it led to, which contained a chest. Boldly, but foolishly, I opened the chest, but not before Cecilia retreated to a safe distance. Unfortunately for me, upon opening the chest, I was assaulted by undead creatures and the concealed door became a solid wall. The foul beings were able to score my hide a number of times, but through runic might I quickly dispatched them. When the last creature fell, the door reappeared, through some form of magic. The chest contained a curious puzzle, which none of us were able to decipher as of yet.
The wooden door led to a room containing some wary dragonborn soldiers, the leader who was known as Drakar Stoneface. But it seems our temporary elven ally Daren knew this Drakar and not in a good way. As soon as he laid eyes on the armoured dragonborn, he bolted back through the door, closing it and triggering the trap the room contained. The door seemed to be reinforced with metal on this side and the walls were rigged to some sort of crushing contraption, as they were inching their way towards us with every passing second.
Spotting a grate 15′ above us, Cecilia yanked it free through her mage hand and rope. I moved to the wall to help others up, but the halflings took advantage of our kindness and scrambled without care towards the grate opening. Only two of the halflings made it through but they promptly disappeared without lending help. The dragonborn also scrambled up, showing a little more kindness in their efforts, though like the halfling, one fell during the climb. Drakar was kind enough to help the others up by holding the rope, but unfortunately the dragonborn and halfling were crushed while engaged in a frightened battle.
We continued along the path to a small room with some basic objects contained within and further down the path we came across a long forgotten tomb. The dragonborn say that this is a tome of a legendary dragonborn and they stopped to pray while we continued on. A slight puzzle halted our progress for a moment, but Dorfel’s unnatural mind was able to easily solve it, slowing us for only a moment. Dorfel also quickly disarmed a trap in front of us too. The talking furniture was beginning to become useful! Hah!
After a number of other minor challenges, Cecilia found herself in possession of some magical boots, which caused her to rapidly move and speak. The brilliant white of her armour created a bright streak wherever she moved, and was able to use her intense speed to destroy the alien rock wall and claim the hidden treasures behind it. Never have I seen so much treasure, save for the ill-gotten gains of my dwarven captors. Amongst the treasure were two items of note: a sword of shimmering scaled design, and a darkened scaled hammer. Fearing invoking any curses the hammer may hold, I chose not to use it, and my trusty Mordenkrad was a much more effective weapon in my hands anyway.
Continuing on, we headed downstairs, hopefully to find these cursed cards and remove ourselves from this dank underground labyrinth.
D&D – Multi-Culture Pals: Tiamat’s Door
Posted by Sam on August 21st, 2010 under D&D • No Comments
Today we found ourselves in surroundings that we seem to so often be in; surrounded by creatures who seek only to kill us. This time however, we encountered some allies, a rare occurrence in our tangled threads of fate.
For 6 days they kept us in those cells, where scum far worse than a group of adventurers reside. I was beginning to lose my way in my internal labyrinth; the shackles that held me were beginning to draw me closer towards the darkened labyrinth of madness. The memories of those cruel dwarves came in ever increasing frequency, and each guard began to appear more and more like those filthy mudapes. Only my companions kept me from becoming violent towards our captors, though sometimes Dorfel’s constant calmness only caused me to become more agitated.
We finally stood trial and though we emerged with a sizable fine, the jurors seemed to agree that we were only defending ourselves. Upon leaving, Cecilia alerted us that she found a map and a Three Dragon Card in her pocket, perhaps slipped to her by Ku during the fight. The map was to each of us illegible, and we decided to have the University decode it for us so that we may continue with our mission. As we headed towards the University, we encountered a strange creature. Almost a human, but hairier and sharper, he introduced himself as what I believe was Erathin, though his name has slipped into the darkened corners of my labyrinth. He is a Longtooth Shifter, a creature part wolf and part man, though he has taken to the path of the Monk. As we conversed with him, we found that he could read the map, and even knew where it could take us. We agreed that he might as well come with us and show us the area directly.
The map brought us to a wooded area, with a darkened cave containing an interesting door. Erathin acted rather strangely outside, speaking in tongues and then suddenly deciding to give each of us a gem. Perhaps it was a Longtooth custom? He said he was not sure where the gems came from, but he felt compelled to distribute them. The cave was not uninhabited though, some wary goblins had taken up residence within. While they were not hostile to us, they were not entirely welcoming, but they seemed fascinated with a crude dice game, to which they invited us to participate in. Sensing that doing so may cause them to reveal information about this door to us, we agreed to play. I was not so lucky in this game, but the outcome still allowed us to learn more from our unlikely allies. The goblins revealed that we were in a trap, though our enemies had not yet returned to trap us. They had instructed the goblins to attack us, but they decided against it. Ignoring our predicament, we decided it better to focus our attention on the door and face our enemies when they showed themselves.
The door interestingly seemed linked to the card Cecilia was holding, though she seemed to have lost it, much to the chagrin of the group. By inserting the gems Erathin had given to each of us in cavities in the door in the same order as Tiamat’s heads and reciting an incantation, we succeeded in opening the door.
Inside was a curious chamber, where the river flowed by at a dangerous pace (as Dolfer found out first-hand) but flowed around curious ‘pits’ in the water. At the far end of the chamber, where a dripping Dolfer was hauled from the river, was a shining pillar of light centred within a large disc on the floor. The disc had a strange dragon engraving and foreign text etched into it. Before we could investigate further, our goblin friends entered, even though they were told not to.
But they were not the goblins we knew. They moved without life and looked as if they had suffered fatal wounds, though they moved without regard for such wounds. The goblins were undead creatures, and other shambling creatures accompanied them. Each of the creatures appeared to be intently focused on the pillar of light, and completely ignored our presence until we openly struck them when they would not cease their advance. Time and time again we struck them down, but they only rose again and shifted closer to the light. In the darkened shadows of the opposite end of the chamber there were two of the Emerald Claw soldiers, and it turns out they were the ones controlling the mindless undead. Leaving Dorfel to keep the creatures from the light, fearing that it could only cause further harm to us, the rest of the us focused our attention on the Emerald Claw members. Twice now the Emerald Claw has attacked us without reason given.
Seems there was another Emerald Claw lurking in the shadows, but he was dealt with by another group, whom we later found to be involved with one of the jury members present at our trial. They were wary of us, thinking we were of the Emerald Claw (mistaken again! Are we really so evil-looking?), but we convinced them of our intentions. They were also against the Emerald Claw, though they would not reveal their motives, but then again, we also kept our mouths shut. They did express great alarm when it was revealed that some of the undead creatures made it to the light and went so far as to destroy the disc the light rose from. They have kept their lips tight so far, but I hope to gather an explanation for their actions as we progress further into the cave together.
Bionic Visual Encryption
Posted by Sam on August 21st, 2010 under Mind of Me • No Comments
Had a random thought. It won’t amount to anything, but I thought I’d note it down regardless.
In the not-too-distant future, our eyesight is likely to be enhanced cybernetically, either with a scouter like overlay or direct modifications to the eye itself. For security purposes or otherwise, these enhancements could be outfitted with automatic decrypters of visual images. Much like the technology of AR, seccure documents could be encrypted into highly secure images that only ‘eyes’ with the correct decrypter could view. In fact, I suppose this is augmented reality.
PhD Project: Bang for your Buck
Posted by Sam on August 20th, 2010 under PhD Project • No Comments
The 10 population constant experiment has completed and after plotting it on a graph where the x axis is time, it is shown to be the best strategy. Sure, the 50 population experiment does get to the apparent ~7000 point limit in fewer iterations, it takes much longer. And as for the 30 population constant one, it hasn’t really run enough to know yet. The curve of its performance vs. time fits it in right between the 10 and 50 in a roughly proportional manner.
I probably should have saved the image for future reference, but I forgot to. Ah well. A possible strategy to pursue is to have a changing population constant, based on the maturity of the experiment. Perhaps a min of 10 and max of 50. Something for later experimentation. The reason for even thinking of it is that smaller population constants are more likely to have large variances. So a form of annealling, I suppose.