Skip to content

Migration to .NET 6 LTS version #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions aima-csharp.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25123.0
# Visual Studio Version 17
VisualStudioVersion = 17.0.32002.185
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "aima-csharp", "aima-csharp\aima-csharp.csproj", "{125F53D5-1CCF-4DAF-82FE-4324686CF417}"
EndProject
Expand All @@ -19,4 +19,7 @@ Global
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {32CF737F-F65E-4EBE-9736-D55E24DF46C3}
EndGlobalSection
EndGlobal
6 changes: 0 additions & 6 deletions aima-csharp/App.config

This file was deleted.

16 changes: 1 addition & 15 deletions aima-csharp/Program.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace aima_csharp
{
class Program
{
static void Main(string[] args)
{
}
}
}

36 changes: 0 additions & 36 deletions aima-csharp/Properties/AssemblyInfo.cs

This file was deleted.

5 changes: 1 addition & 4 deletions aima-csharp/agent/Action.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
using System;
using System.Collections.Generic;

namespace aima.core.agent
{
/**
* Describes an Action that can or has been taken by an Agent via one of its Actuators.
*
* @author Ciaran O'Reilly
*/
public interface Action
public interface Action
{
/**
* Indicates whether or not this Action is a 'No Operation'.<br>
Expand Down
3 changes: 0 additions & 3 deletions aima-csharp/agent/Agent.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections;

namespace aima.core.agent
{
/**
Expand Down
3 changes: 0 additions & 3 deletions aima-csharp/agent/AgentProgram.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;

namespace aima.core.agent
{
/**
Expand Down
3 changes: 0 additions & 3 deletions aima-csharp/agent/Environment.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;

namespace aima.core.agent
{
/**
Expand Down
3 changes: 0 additions & 3 deletions aima-csharp/agent/EnvironmentObject.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;

namespace aima.core.agent
{
/**
Expand Down
3 changes: 0 additions & 3 deletions aima-csharp/agent/EnvironmentState.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;

namespace aima.core.agent
{
/**
Expand Down
7 changes: 2 additions & 5 deletions aima-csharp/agent/EnvironmentView.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;

namespace aima.core.agent
{
/**
Expand All @@ -11,7 +8,7 @@ namespace aima.core.agent
* @author Ciaran O'Reilly
* @author Mike Stampone
*/
public interface EnvironmentView
public interface EnvironmentView
{
/**
* A simple notification message from the Environment, from one of its
Expand Down Expand Up @@ -45,6 +42,6 @@ public interface EnvironmentView
* the EnvironmentState that resulted from the Agent's Action on
* the Environment.
*/
void agentActed(Agent agent, Action action, EnvironmentState resultingState);
void agentActed(Agent agent, agent.Action action, EnvironmentState resultingState);
}
}
5 changes: 1 addition & 4 deletions aima-csharp/agent/EnvironmentViewNotifier.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
using System;
using System.Collections.Generic;

namespace aima.core.agent
{
/**
* @author Ciaran O'Reilly
*
*/
public interface EnvironmentViewNotifier
public interface EnvironmentViewNotifier
{
/**
* A simple notification message, to be forwarded to an Environment's
Expand Down
5 changes: 1 addition & 4 deletions aima-csharp/agent/Model.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;

namespace aima.core.agent
{
/**
Expand All @@ -12,7 +9,7 @@ namespace aima.core.agent
*
* @author Ciaran O'Reilly
*/
public interface Model
public interface Model
{

}
Expand Down
5 changes: 1 addition & 4 deletions aima-csharp/agent/Percept.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;

namespace aima.core.agent
{
{
/**
* Artificial Intelligence A Modern Approach (3rd Edition): pg 34.<br>
* We use the term percept to refer the agent's perceptual inputs at any given instant.
Expand Down
3 changes: 0 additions & 3 deletions aima-csharp/agent/State.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;

namespace aima.core.agent
{
/**
Expand Down
5 changes: 1 addition & 4 deletions aima-csharp/agent/impl/AbstractAgent.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
using System;
using aima.core.agent;

namespace aima.core.agent.impl
{
/**
* @author Ravi Mohan
* @author Ciaran O'Reilly
* @author Mike Stampone
*/
public abstract class AbstractAgent : Agent
public abstract class AbstractAgent : Agent
{
protected AgentProgram program;
private bool alive = true;
Expand Down
7 changes: 2 additions & 5 deletions aima-csharp/agent/impl/AbstractEnvironment.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
using aima.core.agent;
using aima.core.util;

namespace aima.core.agent.impl
Expand All @@ -27,7 +24,7 @@ public abstract class AbstractEnvironment : Environment, EnvironmentViewNotifier
// Methods to be implemented by subclasses.
public abstract EnvironmentState getCurrentState();

public abstract EnvironmentState executeAction(Agent agent, Action action);
public abstract EnvironmentState executeAction(Agent agent, agent.Action action);

public abstract Percept getPerceptSeenBy(Agent anAgent);
/**
Expand Down Expand Up @@ -176,7 +173,7 @@ protected void updateEnvironmentViewsAgentAdded(Agent agent)
}
}

protected void updateEnvironmentViewsAgentActed(Agent agent, Action action,
protected void updateEnvironmentViewsAgentActed(Agent agent, agent.Action action,
EnvironmentState state)
{
foreach (EnvironmentView view in views)
Expand Down
4 changes: 0 additions & 4 deletions aima-csharp/agent/impl/DynamicAction.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
using System;
using System.Collections.Generic;
using aima.core.agent;

namespace aima.core.agent.impl
{
/**
Expand Down
6 changes: 1 addition & 5 deletions aima-csharp/agent/impl/DynamicEnvironmentState.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
using System;
using System.Collections.Generic;
using aima.core.agent;

namespace aima.core.agent.impl
{
/**
* @author Ravi Mohan
* @author Ciaran O'Reilly
*/
public class DynamicEnvironmentState : ObjectWithDynamicAttributes, EnvironmentState
public class DynamicEnvironmentState : ObjectWithDynamicAttributes, EnvironmentState
{
public DynamicEnvironmentState()
{
Expand Down
3 changes: 0 additions & 3 deletions aima-csharp/agent/impl/DynamicPercept.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;
using aima.core.agent;
using System.Diagnostics;

namespace aima.core.agent.impl
Expand Down
4 changes: 0 additions & 4 deletions aima-csharp/agent/impl/DynamicState.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
using System;
using System.Collections.Generic;
using aima.core.agent;

namespace aima.core.agent.impl
{
/**
Expand Down
3 changes: 0 additions & 3 deletions aima-csharp/agent/impl/NoOpAction.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System;
using System.Collections.Generic;

namespace aima.core.agent.impl
{
public class NoOpAction : DynamicAction
Expand Down
4 changes: 1 addition & 3 deletions aima-csharp/agent/impl/ObjectWithDynamicAttributes.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;

Expand All @@ -9,7 +7,7 @@ namespace aima.core.agent.impl
* @author Ravi Mohan
* @author Ciaran O'Reilly
*/
public abstract class ObjectWithDynamicAttributes
public abstract class ObjectWithDynamicAttributes
{
private Dictionary<Object, Object> attributes = new Dictionary<Object, Object>();

Expand Down
6 changes: 1 addition & 5 deletions aima-csharp/agent/impl/SimpleEnvironmentView.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
using System;
using System.Collections.Generic;
using aima.core.agent;

namespace aima.core.agent.impl
{
/**
Expand All @@ -12,7 +8,7 @@ namespace aima.core.agent.impl
*/
public class SimpleEnvironmentView : EnvironmentView
{
public void agentActed(Agent agent, Action action, EnvironmentState resultingState)
public void agentActed(Agent agent, agent.Action action, EnvironmentState resultingState)
{
System.Console.WriteLine("Agent acted: " + action.ToString());
}
Expand Down
8 changes: 3 additions & 5 deletions aima-csharp/agent/impl/aprog/ModelBasedReflexAgentProgram.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using System.Collections.Generic;
using aima.core.agent;
using aima.core.agent.impl.aprog.simplerule;

namespace aima.core.agent.impl.aprog
Expand All @@ -16,7 +14,7 @@ namespace aima.core.agent.impl.aprog
* rules, a set of condition-action rules
* action, the most recent action, initially none
*
* state <- UPDATE-STATE(state, action, percept, model)
* state <- UPDATE-STATE(state, agent.Action, percept, model)
* rule <- RULE-MATCH(state, rules)
* action <- rule.ACTION
* return action
Expand Down Expand Up @@ -91,7 +89,7 @@ public void setRules(HashSet<Rule> ruleSet)
// function MODEL-BASED-REFLEX-AGENT(percept) returns an action
public Action execute(Percept percept)
{
// state <- UPDATE-STATE(state, action, percept, model)
// state <- UPDATE-STATE(state, agent.Action, percept, model)
state = updateState(state, action, percept, model);
// rule <- RULE-MATCH(state, rules)
Rule rule = ruleMatch(state, rules);
Expand All @@ -111,7 +109,7 @@ public Action execute(Percept percept)
*/
protected abstract void init();

protected abstract DynamicState updateState(DynamicState state, Action action, Percept percept, Model model);
protected abstract DynamicState updateState(DynamicState state, agent.Action action, Percept percept, Model model);

protected Rule ruleMatch(DynamicState state, HashSet<Rule> rules)
{
Expand Down
6 changes: 1 addition & 5 deletions aima-csharp/agent/impl/aprog/SimpleReflexAgentProgram.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
using System;
using System.Collections.Generic;
using aima.core.agent;
using aima.core.agent.impl;
using aima.core.agent.impl.aprog.simplerule;

namespace aima.core.agent.impl.aprog
Expand All @@ -27,7 +23,7 @@ namespace aima.core.agent.impl.aprog
* @author Mike Stampone
*
*/
public class SimpleReflexAgentProgram : AgentProgram
public class SimpleReflexAgentProgram : AgentProgram
{
// persistent: rules, a set of condition-action rules
private HashSet<Rule> rules;
Expand Down
3 changes: 0 additions & 3 deletions aima-csharp/agent/impl/aprog/TableDrivenAgentProgram.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
using System.Collections.Generic;
using aima.core.agent;
using aima.core.agent.impl;
using aima.core.util;

namespace aima.core.agent.impl.aprog
Expand Down
3 changes: 0 additions & 3 deletions aima-csharp/agent/impl/aprog/simplerule/ANDCondition.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using aima.core.agent.impl;

namespace aima.core.agent.impl.aprog.simplerule
{
Expand Down
Loading