add: Agent Actions
This commit is contained in:
@@ -1,28 +1,17 @@
|
||||
namespace Polonium.Agents;
|
||||
|
||||
public abstract class AgentDecisionMaker<TAgent, TAgentDecisionMaker, TAgentKnowledge>
|
||||
where TAgent : Agent<TAgent, TAgentDecisionMaker, TAgentKnowledge>
|
||||
where TAgentDecisionMaker : AgentDecisionMaker<TAgent, TAgentDecisionMaker, TAgentKnowledge>, new()
|
||||
where TAgentKnowledge : AgentKnowledge<TAgent, TAgentDecisionMaker, TAgentKnowledge>, new()
|
||||
public abstract class AgentDecisionMaker<TAgent, TAgentDecisionMaker, TAgentKnowledge, TAgentAction>(DecisionMakerType type)
|
||||
where TAgent : Agent<TAgent, TAgentDecisionMaker, TAgentKnowledge, TAgentAction>, new()
|
||||
where TAgentDecisionMaker : AgentDecisionMaker<TAgent, TAgentDecisionMaker, TAgentKnowledge, TAgentAction>, new()
|
||||
where TAgentKnowledge : AgentKnowledge<TAgent, TAgentDecisionMaker, TAgentKnowledge, TAgentAction>, new()
|
||||
where TAgentAction : AgentAction<TAgent, TAgentDecisionMaker, TAgentKnowledge, TAgentAction>, new()
|
||||
{
|
||||
|
||||
public enum DecisionMakerType
|
||||
{
|
||||
None = 0,
|
||||
Player = 1,
|
||||
Computer = 2,
|
||||
Global = 3,
|
||||
}
|
||||
|
||||
public DecisionMakerType Type { get; init; }
|
||||
|
||||
public AgentDecisionMaker()
|
||||
{
|
||||
Type = DecisionMakerType.Computer;
|
||||
}
|
||||
|
||||
public AgentDecisionMaker(DecisionMakerType type)
|
||||
|
||||
public DecisionMakerType Type { get; init; } = type;
|
||||
|
||||
public AgentDecisionMaker() : this(DecisionMakerType.Computer)
|
||||
{
|
||||
Type = type;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user