From ced3d03bdb3ce866d832e03fb212865140905a9a Mon Sep 17 00:00:00 2001 From: Thomas Leyh Date: Sun, 24 Jul 2016 08:14:18 +0200 Subject: Add project files. --- V3/AI/IAiPlayer.cs | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 V3/AI/IAiPlayer.cs (limited to 'V3/AI/IAiPlayer.cs') diff --git a/V3/AI/IAiPlayer.cs b/V3/AI/IAiPlayer.cs new file mode 100644 index 0000000..7f5f81b --- /dev/null +++ b/V3/AI/IAiPlayer.cs @@ -0,0 +1,51 @@ +using System.Collections.Generic; +using Microsoft.Xna.Framework; + +namespace V3.AI +{ + /// + /// A computer player that takes actions according to a specified strategy. + /// + public interface IAiPlayer + { + /// + /// The current world view of the player. It stores the knowledge of + /// the computer player based on the previous percepts. + /// + IWorldView WorldView { get; } + /// + /// The strategy of the player. The strategy is a state machine that + /// defines the current state. + /// + IStrategy Strategy { get; } + /// + /// The current state of the player. The state is one step of the + /// strategy, and defines the specific actions to take. + /// + AiState State { get; set; } + /// + /// The actions that the player wants to be executed. Updated by + /// Act. + /// + IList Actions { get; } + + /// + /// Executes one update cycle -- perception, acting and the execution + /// of actions. + /// + /// the time since the last update + void Update(GameTime gameTime); + + /// + /// Update the AI's view of the game world. + /// + void Percept(); + + /// + /// Take actions based on the previous percepts, the current strategy + /// and state. Updates the list of actions stored in Actions. These + /// should be executed by the caller. + /// + void Act(); + } +} -- cgit v1.2.1