Dr. Mark Humphrys

School of Computing. Dublin City University.

Online coding site: Ancient Brain

coders   JavaScript worlds

Search:

Free AI exercises


CA300 - practical


  The World-Wide-Mind server: The Tyrrell world:

CA300 practical



The World-Wide-Mind

The practical is based on the "World-Wide-Mind" project.



Tyrrell's world

In this practical, the World server will be an animal-behaviour problem called "Tyrrell's world".

The "Tyrrell's world" World server is online at w2mind.computing.dcu.ie



Graphical view of Tyrrell's World.
Note that the creature sees only part of the world.
Also it does not see this image. Rather it sees a text description of the world (see following).


	perceivedFatShortage:0.5994355682777777;
      perceivedCarbohydrateShortage:0.6003002752721399;
      perceivedProteinShortage:0.5970390398266352;
      perceivedWaterShortage:0.6010274482908156;
      perceivedAnimalLowTemperature:0.0;
      perceivedAnimalHighTemperature:0.0;
      perceivedCellLowTemperature:0.0038469630420412924;
      perceivedCellHighTemperature:0.0;  mateCourted:0.0;
      perceivedAnimalCleanliness:0.5021354162694708;
      nightProximity:0.002006389150289807;  animalVariance:0.0;
      distanceFromDen:0.0;
      foodPerceptionStimulus:[0.0,0.1,0.1,0.0,0.1,0.1,0.1,0.1,0.1];
      foodMemoryStimulus:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0];
      waterPerceptionStimulus:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0];
      waterMemoryStimulus:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0];
      shelterPerceptionStimulus:[1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0];
      shadePerceptionStimulus:[0.7,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0];
      predator1PerceptionStimulus:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0];
      predator2PerceptionStimulus:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0];
      dangerousPlacePerceptionStimulus1:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0];
      irrelevantAnimalPerceptionStimulus1:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0];
      matePerceptionStimulus:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0];
      denPerceptionStimulus:[1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0];
      denMemoryStimulus:[1.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0];
      timeSinceLastScan:0.0;  distanceToCover:0.0;
      timeSinceLastPredator:1.0;  animalHealth:1.0;
      animalPermanentInjury:0.0;
      dangerousPlacePerceptionStimulus2:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0];
      irrelevantAnimalPerceptionStimulus2:[0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0];

The creature senses the state of the World in text format as above.




How to run a Mind

Select your Mind. Click run button.


How to write a Mind

How to solve the problem: The "creature" in Tyrrell's world has multiple conflicting goals. It needs to stay alive, find food and water, avoid predators and dangerous places, hide and sleep at night, keep clean, mate, etc. Your job in this practical is to give it a "Mind".

When we "run" the Mind in the World, we repeatedly ask the World to describe itself by sending it a "Get State" message, then we ask the Mind what to do by sending it a "Get Action" message, then we execute the action by sending the World server a "Take Action" message.


You can:

  1. Simply run one of the existing Mind servers in the World, and see how well you score.

  2. Construct a new Mind offline, and run that. This may query the online World for state, or may query an offline copy of the World. This program cannot be run by other people.

  3. Construct a new Mind "server" online, and run that. This will run in the online World. This program can then be run by other people.

  4. Construct a new Mind server yourself, online or offline, which calls an existing online Mind server. The WWM architecture encourages this, to encourage re-use of other people's Minds. This is the whole point of the WWM (also here). This is called a MindM server. It may add some actions of its own, or not.

  5. The MindM server may call multiple online Mind servers, and choose between their multiple suggested actions in order to get the action to take. This is called a MindAS server.

  6. Sub-goal only: You may decide to specialise on only one sub-goal, or a small set of sub-goals. e.g. Create the best food-finder. Your friend creates the best predator-avoider. A third friend then combines these ultra-specialists into a MindAS system.

  7. Mind designed to be easy to call by other Minds. Say your Mind returns not only an action, but also a measure of confidence in that action (say a weight from 1 to 10). Instead of (a) it returns (a,w). Then a MindAS server can poll a number of Minds like this, and pick the action of the one that is most confident. i.e. Your Mind may be designed to be part of a larger system.


Register

  1. Please use your proper name in the "Name" field (no nicknames), or scores will NOT be properly credited to you.


3rd year AI practical

The practical is to:
  1. Write 3 Minds for the "Tyrrell's world" problem.
    They should all have the same naming convention: MindName1, MindName2, MindName3.
    The 3 Minds should be as follows:

    1. MindName1 - A Mind that returns actions: (a). This should not call any other Mind.
    2. MindName2 - A Mind that returns actions with a confidence weight from 1 to 10: (a,w). This should not call any other Mind.
    3. MindName3 - A Mind that is a MindM server or a MindAS server. That is, it must call another Mind or Minds as part of its deliberations at some point. It may ignore their ideas for what action to take in favour of its own, but there must exist at least one state of the World where it asks another Mind what action it would take. Example:
      if (predator visible)
        ask Mind73 what to do
        if answer=n ignore it and override with my own action
        else do whatever Mind73 suggests
      else (no predator visible)
        don't ask any other Mind, take my own action
      

  2. For now, Minds have to be written in Java.
  3. In terms of solving the problem, you may use any method (hand-coded, search, learning, evolution, etc.).
  4. From the AI point of view, this illustrates a problem with an unpredictable world, a massive state-space, multiple conflicting goals, and no known optimal solution. (We believe the theoretical maximum lifespan of an animal is 5000 timesteps. We do not know if this is possible in practice. We also do not know how many mates it is possible to have.)
  5. Get your score onto the scoreboard.
  6. Write up how you did it, including the full commented source code of all programs involved.
    Code should be colour, syntax-highlighted printout in landscape mode (the best way to print code.)
  7. You should also document your Mind online in an index.html file. How much detail you explain online is up to you, but you should explain something about what the Mind does. The paper document for handing up should contain full source code. The online documentation does not have to.
  8. Give me a tidy, bound write-up on paper by the deadline.
  9. Make sure these are written on your submission:
    1. Course: CA300
    2. Lecturer: Mark Humphrys
    3. Your name
    4. Your student number
  10. You also need to fill in the Survey.

Notes:

  1. You may have any number of submissions.
  2. You can repeatedly run your mind online to improve your score on the scoreboard. Since it is a probabilistic world, any single run may be "unlucky". So run it many times online. The single best run will be recorded on the scoreboard.



Marking

You will get marks for lots of things. This will be a bit of a free-for-all, including marks for scoring, marks for coding, marks for the write-up, marks for re-use of other Minds, marks for being re-used, and even marks for finding bugs in the system.

All I ask is that your write-up is honest and explains what you did. I will decide the exact score at the end:


  1. You will get marks for performing well on the scoreboard.
  2. You will get marks for performing well on some specialised sub-goal.
  3. You will get marks for the write-up.

  4. Just to say explicitly about the write-up: You will get marks for good analysis of how the world and your mind, or other minds, work. Even if you find a bug in the world, write it up and you can get marks. If you find "bugs" (or at least strange features) in the world, isolate them, replicate them and write it up properly and you will get marks for such analysis.

  5. Mind server
    1. You will get marks for writing your own Mind server, offline or online. But you must document how it works and why it scored the points it did. If any dishonesty is detected in your write-up you will fail the project.
    2. You will get a lot of marks for using search, learning, evolution, or any other interesting algorithm, in your server.

  6. MindM server
    1. You will get marks for a Mind server that re-uses an existing Mind server. i.e. A MindM server. The WWM is all about this kind of re-use. It's meant to be this way. But you must document how you did this. If any dishonesty is detected in your write-up you will fail the project.
    2. You may re-use your classmates' Mind servers, your own Mind servers, and our pre-written Mind servers (and any other Mind servers you can find).

  7. MindAS server
    1. You will get a lot of marks for re-using multiple other Mind servers, and having some kind of "server selection" algorithm. i.e. A MindAS server.

  8. Finding bugs
    1. You will get marks for finding bugs in the system, security flaws, etc. Write it all up properly. Please tell me about these bugs as you go along, as well as writing them up in the report.


Your program may be used by others in the future

Your program when uploaded on our server may be used by others in unpredictable ways.

It may be used for further experiments in our WWM research project, which aims to find ways of building up complex Minds composed of the works of multiple authors. Previous students' Minds have ended up being re-used in larger, multi-Mind systems, and even discussed in various scientific papers.

e.g. See a paper: at the 8th International Conference on the Simulation of Adaptive Behavior in Los Angeles in 2004.

If you do not want this to happen, you can delete your Mind at any time. (But wait until after you have got your practical results!)



ancientbrain.com      w2mind.org      humphrysfamilytree.com

On the Internet since 1987.      New 250 G VPS server.

Note: Links on this site to user-generated content like Wikipedia are highlighted in red as possibly unreliable. My view is that such links are highly useful but flawed.