Robin Thoni f87a9b3f2c cleanup; README | 7 年前 | |
---|---|---|
.idea/.idea.uqac-ia-aspirobot | 7 年前 | |
uqac-ia-aspirobot | 7 年前 | |
.gitignore | 7 年前 | |
README.md | 7 年前 | |
uqac-ia-aspirobot.sln | 7 年前 |
Aspirobot is a simple® AI agent that vaccums dust in your rooms but pick up your jewels.
Command line
cd uqac-ia-aspirobot
dotnet restore
dotnet build
dotnet run
Visual Studio
Run VS, open solution, wait for package restore, click run (F5)
Rider
Run Rider, open solution, wait for package restore, click run (Shift + F10)
Some behaviors can be configured in Program.cs file:
EnvConfig
(Environment configuration)
Height
: Map heightWidth
: Map widthActionPropability
: Probability that an action occurs in the enviromnent, once per EnvConfig.SleepTime
(>=0, <=100)AddDustProbability
: Probability that a dust is added on the map, only when an action is to be taken (>=0, <=100)AddJewelProbability
: Probability that a jewel is added on the map, only when an action is to be taken,
and AddDustProbability
does not occur (>=0, <=100)RemoveJewelProbability
: Probability that a jewel is removed from the map, only when an action is to be taken,
and neither EnvConfig.AddDustProbability
nor EnvConfig.AddJewelProbability
occur (>=0, <=100)SleepTime
: Time between each iteration in ms (>=0)
AgConfig
(Agent configuration)
SleepTime
: Time between each iteration in ms (>=0)StartX
: Agent start X position (>=0, <EnvConfig.Width
)StartY
: Agent start Y position (>=0, <EnvConfig.Height
)AutoAdjustThinkTimeInterval
: Indicate if agent should try to auto adjust think time interval (AgConfig.ThinkTimeInterval
)ThinkTimeInterval
: Default think time interval in ms (>=0). This variable controls how often the agent will re-evaluate the situation
Agent will loop forever (until killed) peforming the following operations:
AgConfig.SleepTime
msFakeEnv implementation will loop forever (until killed) peforming the following operations:
EnvConfig.SleepTime
msEnvConfig.ActionPropability
EnvConfig.AddDustProbability
EnvConfig.AddJewelProbability
.
Can only happen if no previous action has been done.EnvConfig.RemoveJewelProbability
.
Can only happen if no previous action has been done.This agent is coded in .NET Core (C#) using DI (Dependency Injection) and interfaces to abstract implementation and allow to run a virtual environment or a real one without changing anything in the agent implementation
FakeEnv implementation starts one thread for the environment and another one for the agent.
Agent logic is in Agent/*.cs
Agent sensors and effectors interfaces are in Agent/Interfaces/*
Agent FakeEnv client implementation is in Agent/FakeEnv/*
FakeEnv client, server, protocol and configuration are defined in Common/*.cs
FakeEnv server implementation is in Environment/*.cs
Some helper methods are defined in Extensions/Extensions.cs
Shared interfaces are in Interfaces/*.cs
Console user interface is in UI/UiConsole.cs