Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

Animat example with 16 states and 4 actions #1075

@FireDragonGameStudio

Description

@FireDragonGameStudio

What would you like to submit? (put an 'x' inside the bracket that applies)

  • question
  • bug report
  • feature request

Issue description
Hy,
I am currently working on the QLearning Animat sample. When running test1 with 256 states, 8 sensors and 4 actions everything works. After reducing the sensors to 4 and the states to 16 the learning will not succeed, even if I change the number of iterations to 1000. Can somebody explain, why this is not working? I attached the changed code, maybe this will help.

Best regards :)

...
qLearning = new QLearning(16, 4, new TabuSearchExploration(4, new EpsilonGreedyExploration(explorationRate)));
...
private int GetStateNumber(int x, int y) {
    int c1 = (map[y - 1, x] != 0) ? 1 : 0;
    int c2 = (map[y, x + 1] != 0) ? 1 : 0;
    int c3 = (map[y + 1, x] != 0) ? 1 : 0;
    int c4 = (map[y, x - 1] != 0) ? 1 : 0;

    return c1 | (c2 << 1) | (c3 << 2) | (c4 << 3);
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions