Download Agent/Program/TableDrivenAgentProgram.cs from ewdlop/AIMA-CSharp: direct link, hf CLI and curl.
- Browser
- Download file 745 Bytes
-
https://huggingface.co/ewdlop/AIMA-CSharp/resolve/refs%2Fpr%2F1/Agent/Program/TableDrivenAgentProgram.cs
- Command line
-
hf download hf://ewdlop/AIMA-CSharp@refs/pr/1/Agent/Program/TableDrivenAgentProgram.cs
-
curl -L -o TableDrivenAgentProgram.cs https://huggingface.co/ewdlop/AIMA-CSharp/resolve/refs%2Fpr%2F1/Agent/Program/TableDrivenAgentProgram.cs
745 Bytes
| using AIMA.Agent.Action; | |
| using AIMA.Agent.Percept; | |
| using System.Collections.Generic; | |
| namespace AIMA.Agent.Program | |
| { | |
| public class TableDrivenAgentProgram<T1,T2> : IAgentProgram<T1,T2> where T1: IAction where T2:IPercept | |
| { | |
| private IList<T2> Percepts { get;init; } = new List<T2>(); | |
| //private Table<List<Percept>, System.String, Action> table; | |
| private const string ACTION = "action"; | |
| public T1 Execute(T2 percept) | |
| { | |
| // append percept to end of percepts | |
| Percepts.Add(percept); | |
| // action <- LOOKUP(percepts, table) | |
| // return action | |
| //return LookupCurrentAction(); | |
| return default; | |
| } | |
| } | |
| } | |