text stringlengths 3 1.18M |
|---|
package 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 {
/**
* Indicates whether or not this Action is a 'No Operation'.<br>
* Note: AIMA3e - NoOp, or no operation, is the n... |
package aima.core.agent;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): Figure 2.1, page 35.<br>
*
* Figure 2.1 Agents interact with environments through sensors and actuators.
*/
/**
* @author Ravi Mohan
* @author Ciaran O'Reilly
*/
public interface Agent extends EnvironmentObject... |
package aima.core.agent;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): pg 50.<br>
*
* The most effective way to handle partial observability is for the agent to keep track of the
* part of the world it can't see now. That is, the agent should maintain some sort of internal
* state that de... |
package aima.core.agent;
/**
* An interface used to indicate a possible state of an Environment.
*/
/**
* @author Ciaran O'Reilly
*/
public interface EnvironmentState {
}
|
package aima.core.agent;
import java.util.List;
/**
* An abstract description of possible discrete Environments in which Agent(s)
* can perceive and act.
*/
/**
* @author Ravi Mohan
* @author Ciaran O'Reilly
*/
public interface Environment {
/**
*
* @return The Agents belonging to this E... |
package aima.core.agent.impl;
import aima.core.agent.State;
/**
* @author Ciaran O'Reilly
*/
public class DynamicState extends ObjectWithDynamicAttributes implements State {
public DynamicState() {
}
@Override
public String describeType() {
return State.class.getSimpleName();
}
} |
package aima.core.agent.impl;
import aima.core.agent.Action;
import aima.core.agent.Agent;
import aima.core.agent.EnvironmentState;
import aima.core.agent.EnvironmentView;
/**
* Simple environment view which uses the standard
* output stream to inform about relevant events.
* @author Ruediger Lunde
*/
... |
package aima.core.agent.impl;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import aima.core.agent.Action;
import aima.core.agent.Agent;
import aima.core.agent.Environment;
import aima.core.age... |
package aima.core.agent.impl;
import aima.core.agent.Action;
import aima.core.agent.Agent;
import aima.core.agent.AgentProgram;
import aima.core.agent.Percept;
/**
* @author Ravi Mohan
* @author Ciaran O'Reilly
*/
public abstract class AbstractAgent implements Agent {
protected AgentProgram program;... |
package aima.core.agent.impl;
import aima.core.agent.EnvironmentState;
/**
* @author Ravi Mohan
* @author Ciaran O'Reilly
*/
public class DynamicEnvironmentState extends ObjectWithDynamicAttributes
implements EnvironmentState {
public DynamicEnvironmentState() {
}
@Override
public String des... |
package aima.core.agent.impl.aprog.simplerule;
import aima.core.agent.impl.ObjectWithDynamicAttributes;
/**
* Implementation of an EQUALity condition.
*
*/
/**
* @author Ciaran O'Reilly
*
*/
public class EQUALCondition extends Condition {
private Object key;
private Object value;
public EQUALCondition(Ob... |
package aima.core.agent.impl.aprog.simplerule;
import aima.core.agent.impl.ObjectWithDynamicAttributes;
/**
* Implementation of an AND condition.
*
*/
/**
* @author Ciaran O'Reilly
*
*/
public class ANDCondition extends Condition {
private Condition left;
private Condition right;
public ANDCondition(Cond... |
package aima.core.agent.impl.aprog.simplerule;
import aima.core.agent.impl.ObjectWithDynamicAttributes;
/**
* Implementation of a NOT condition.
*
*/
/**
* @author Ciaran O'Reilly
*
*/
public class NOTCondition extends Condition {
private Condition con;
public NOTCondition(Condition aCon) {
assert (null ... |
package aima.core.agent.impl.aprog.simplerule;
import aima.core.agent.impl.ObjectWithDynamicAttributes;
/**
* Implementation of an OR condition.
*
*/
/**
* @author Ciaran O'Reilly
*
*/
public class ORCondition extends Condition {
private Condition left;
private Condition right;
public ORCondition(Conditi... |
package aima.core.agent.impl.aprog.simplerule;
import aima.core.agent.impl.ObjectWithDynamicAttributes;
/**
* Base abstract class for describing conditions.
*
*/
/**
* @author Ciaran O'Reilly
*
*/
public abstract class Condition {
public abstract boolean evaluate(ObjectWithDynamicAttributes p);
@Override
... |
package aima.core.agent.impl.aprog.simplerule;
import aima.core.agent.Action;
import aima.core.agent.impl.ObjectWithDynamicAttributes;
/**
* A simple implementation of a "condition-action rule".
*
*/
/**
* @author Ciaran O'Reilly
*
*/
public class Rule {
private Condition con;
private Action action;
pub... |
package aima.core.agent.impl.aprog;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import aima.core.agent.Action;
import aima.core.agent.AgentProgram;
import aima.core.agent.Percept;
import aima.core.agent.impl.NoOpAction;
import aima.core.util.datastructure.Table;
/**
* Artificial Intelli... |
package aima.core.agent.impl.aprog;
import java.util.Set;
import aima.core.agent.Action;
import aima.core.agent.AgentProgram;
import aima.core.agent.Percept;
import aima.core.agent.impl.DynamicPercept;
import aima.core.agent.impl.NoOpAction;
import aima.core.agent.impl.ObjectWithDynamicAttributes;
import aima.core.ag... |
package aima.core.agent.impl.aprog;
import java.util.Set;
import aima.core.agent.Action;
import aima.core.agent.AgentProgram;
import aima.core.agent.Model;
import aima.core.agent.Percept;
import aima.core.agent.impl.DynamicState;
import aima.core.agent.impl.NoOpAction;
import aima.core.agent.impl.aprog.simplerule.Rul... |
package aima.core.agent.impl;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
/**
* @author Ravi Mohan
* @author Ciaran O'Reilly
*/
public abstract class ObjectWithDynamicAttributes {
private Map<Object, Object> attributes = new LinkedHashMap<O... |
package aima.core.agent.impl;
import aima.core.agent.Action;
/**
* @author Ciaran O'Reilly
*/
public class DynamicAction extends ObjectWithDynamicAttributes implements
Action {
public static final String ATTRIBUTE_NAME = "name";
//
public DynamicAction(String name) {
this.setAttribute(ATTRIBU... |
package aima.core.agent.impl;
import aima.core.agent.Percept;
/**
* @author Ravi Mohan
* @author Ciaran O'Reilly
*/
public class DynamicPercept extends ObjectWithDynamicAttributes implements
Percept {
public DynamicPercept() {
}
@Override
public String describeType() {
return Percept.clas... |
package aima.core.agent.impl;
public class NoOpAction extends DynamicAction {
public static final NoOpAction NO_OP = new NoOpAction();
//
// START-Action
public boolean isNoOp() {
return true;
}
// END-Action
//
private NoOpAction() {
super("NoOp");
}
}
|
package aima.core.agent;
/**
* Allows external applications/logic to view the interaction of Agent(s) with an Environment.
*/
/**
* @author Ravi Mohan
* @author Ciaran O'Reilly
*/
public interface EnvironmentView {
/**
* A simple notification message from the Environment, from one of its
* obj... |
package aima.core.agent;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): pg 35.<br>
* An agent's behavior is described by the 'agent function' that maps any given percept
* sequence to an action. Internally, the agent function for an artificial agent will be
* implemented by an agent program.
... |
package aima.core.agent;
/**
* An interface used to indicate any object that can belong within an Environment.
*/
/**
* @author Ravi Mohan
* @author Ciaran O'Reilly
*/
public interface EnvironmentObject {
}
|
package aima.core.agent;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): pg 50.<br>
*
* This knowledge about "how the world works" - whether implemented in simple Boolean circuits
* or in complete scientific theories - is called a model of the world. An Agent that uses such a
* model is cal... |
package aima.core.agent;
/**
* @author Ciaran O'Reilly
*
*/
public interface EnvironmentViewNotifier {
/**
* A simple notification message, to be forwarded to an Environment's
* registered EnvironmentViews.
*
* @param msg
* the message to be forwarded to the EnvironmentViews.
... |
package aima.core.search.local;
/**
* @author Ravi Mohan
*
*/
public class Scheduler {
private final int k, limit;
private final double lam;
public Scheduler(int k, double lam, int limit) {
this.k = k;
this.lam = lam;
this.limit = limit;
}
public Scheduler() {
this.k = 20;
th... |
package aima.core.search.local;
import java.util.HashSet;
import java.util.Random;
import java.util.Set;
import aima.core.search.framework.GoalTest;
import aima.core.search.framework.Metrics;
import aima.core.util.Util;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): Figure 4.8, page 129.
... |
package aima.core.search.local;
import java.util.ArrayList;
import java.util.List;
import aima.core.agent.Action;
import aima.core.search.framework.HeuristicFunction;
import aima.core.search.framework.Node;
import aima.core.search.framework.NodeExpander;
import aima.core.search.framework.Problem;
import aim... |
package aima.core.search.local;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): page 127.
*
* Each state is rated by the objective function, or (in Genetic Algorithm terminology) the fitness function.
* A fitness function should return higher values for better states.
*/
/**
* @author ... |
package aima.core.search.local;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import aima.core.agent.Action;
import aima.core.search.framework.HeuristicFunction;
import aima.core.search.framework.Node;
import aima.core.search.framework.NodeExpander;
import aima.core.search.fram... |
package aima.core.search.informed;
import java.util.Comparator;
import aima.core.search.framework.EvaluationFunction;
import aima.core.search.framework.GraphSearch;
import aima.core.search.framework.Node;
import aima.core.search.framework.PrioritySearch;
import aima.core.search.framework.QueueSearch;
/**
... |
package aima.core.search.informed;
import aima.core.search.framework.EvaluationFunction;
import aima.core.search.framework.HeuristicFunction;
import aima.core.search.framework.Node;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): page 92.
*
* Greedy best-first search tries to expand the no... |
package aima.core.search.informed;
import aima.core.search.framework.EvaluationFunction;
import aima.core.search.framework.HeuristicFunction;
import aima.core.search.framework.Node;
import aima.core.search.framework.PathCostFunction;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): page 93.
*... |
package aima.core.search.informed;
import java.util.ArrayList;
import java.util.List;
import aima.core.agent.Action;
import aima.core.search.framework.EvaluationFunction;
import aima.core.search.framework.Node;
import aima.core.search.framework.NodeExpander;
import aima.core.search.framework.Problem;
import... |
package aima.core.search.informed;
import aima.core.search.framework.HeuristicFunction;
import aima.core.search.framework.QueueSearch;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): page 92.
*
* Greedy best-first search tries to expand the node that is closest to the goal,
* on the groun... |
package aima.core.search.informed;
import aima.core.search.framework.HeuristicFunction;
import aima.core.search.framework.QueueSearch;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): page 93.
*
* The most widely known form of best-first search is called A* Search (pronounced
* "A-star sea... |
package aima.core.search.uninformed;
import java.util.List;
import aima.core.agent.Action;
import aima.core.search.framework.GraphSearch;
import aima.core.search.framework.Metrics;
import aima.core.search.framework.Node;
import aima.core.search.framework.Problem;
import aima.core.search.framework.QueueSearch... |
package aima.core.search.uninformed;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import aima.core.agent.Action;
import aima.core.search.framework.BidirectionalProblem;
import aima.core.search.framework.GraphSearch;
import a... |
package aima.core.search.uninformed;
import java.util.Comparator;
import aima.core.search.framework.GraphSearch;
import aima.core.search.framework.Node;
import aima.core.search.framework.PrioritySearch;
import aima.core.search.framework.QueueSearch;
/**
* Artificial Intelligence A Modern Approach (3rd Edi... |
package aima.core.search.uninformed;
import java.util.List;
import aima.core.agent.Action;
import aima.core.search.framework.Metrics;
import aima.core.search.framework.Node;
import aima.core.search.framework.Problem;
import aima.core.search.framework.QueueSearch;
import aima.core.search.framework.Search;
im... |
package aima.core.search.uninformed;
import java.util.Collections;
import java.util.List;
import aima.core.agent.Action;
import aima.core.search.framework.Metrics;
import aima.core.search.framework.NodeExpander;
import aima.core.search.framework.Problem;
import aima.core.search.framework.Search;
/**
* A... |
package aima.core.search.uninformed;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import aima.core.agent.Action;
import aima.core.search.framework.CutOffIndicatorAction;
import aima.core.search.framework.Node;
import aima.core.search.framework.NodeExpander;
import aima.co... |
package aima.core.search.csp;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Hashtable;
import java.util.List;
/**
* Artificial Intelligence A Modern Approach (3rd Ed.): Section 6.1, Page 202. A
* constraint satisfaction problem or CSP consists of three components, X, D,
* and... |
package aima.core.search.csp;
import java.util.ArrayList;
import java.util.List;
/**
* Artificial Intelligence A Modern Approach (3rd Ed.): Figure 6.1, Page 204.
* The principal states and territories of Australia. Coloring this map can be
* viewed as a constraint satisfaction problem (CSP). The goal is to... |
package aima.core.search.csp;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import aima.core.util.ArrayIterator;
/**
* A domain Di consists of a set of allowable values {v1, ... , vk} for the
* corresponding variable Xi and defines a default order on those values. This
*... |
package aima.core.search.csp;
import java.util.ArrayList;
import java.util.List;
import aima.core.util.Util;
/**
* Artificial Intelligence A Modern Approach (3rd Ed.): Figure 6.8, Page 221.
*
* <pre>
* <code>
* function MIN-CONFLICTS(csp, max-steps) returns a solution or failure
* inputs: csp,... |
package aima.core.search.csp;
import java.util.ArrayList;
import java.util.List;
/**
* Base class for CSP solver implementations. Solving a CSP means finding an
* assignment, which is consistent and complete with respect to a CSP. This
* abstract class provides the central interface method and additionally... |
package aima.core.search.csp;
import aima.core.util.datastructure.FIFOQueue;
/**
*
* Artificial Intelligence A Modern Approach (3rd Ed.): Figure 6.3, Page 209.
*
* <pre>
* <code>
* function AC-3(csp) returns false if an inconsistency is found and true otherwise
* inputs: csp, a binary CSP with ... |
package aima.core.search.csp;
/**
* Artificial Intelligence A Modern Approach (3rd Ed.): Figure 6.5, Page 215.
*
* <pre>
* <code>
* function BACKTRACKING-SEARCH(csp) returns a solution, or failure
* return BACKTRACK({ }, csp)
*
* function BACKTRACK(assignment, csp) returns a solution, or failure... |
package aima.core.search.csp;
import java.util.ArrayList;
import java.util.List;
/**
* Represents a binary constraint which forbids equal values.
*
* @author Ruediger Lunde
*/
public class NotEqualConstraint implements Constraint {
private Variable var1;
private Variable var2;
private List<Vari... |
package aima.core.search.csp;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import aima.core.util.datastructure.Pair;
/**
* Provides informations which might be useful for a caller of a
* constraint propagation algorithm. It maintains old domains for
* variables and provi... |
package aima.core.search.csp;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import aima.core.util.datastructure.Pair;
public class ImprovedBacktrackingStrategy extends BacktrackingStrategy {
protected Selection selectionStrategy = Selection.D... |
package aima.core.search.csp;
/**
* Interface which allows interested clients to register at a solution strategy
* and follow their progress step by step.
*
* @author Ruediger Lunde
*/
public interface CSPStateListener {
/** Informs about changed assignments. */
void stateChanged(Assignment assignmen... |
package aima.core.search.csp;
/**
* A variable is a distinguishable object with a name.
*
* @author Ruediger Lunde
*/
public class Variable {
private String name;
public Variable(String name) {
this.name = name;
}
public String getName() {
return name;
}
public String toString() {
... |
package aima.core.search.csp;
import java.util.List;
/**
* A constraint specifies the allowable combinations of values for a set of
* variables. Each constraint consists of a pair <scope, rel>, where scope is a
* tuple of variables that participate in the constraint and rel is a relation
* that defines th... |
package aima.core.search.csp;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Hashtable;
import java.util.List;
/**
* An assignment assigns values to some or all variables of a CSP.
*
* @author Ruediger Lunde
*/
public class Assignment {
/**
* Contains all assigned var... |
package aima.core.search.adversarial;
import java.util.ArrayList;
import aima.core.util.Util;
/**
* @author Ravi Mohan
*
*/
public abstract class Game {
protected GameState initialState = new GameState();
protected GameState presentState = new GameState();
protected int level;
public abst... |
package aima.core.search.adversarial;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Set;
/**
* @author Ravi Mohan
*
*/
public class GameState {
private Hashtable<String, Object> state;
public GameState() {
state = new Hashtable<String, Object>();
}
@Override
pu... |
package aima.core.search.adversarial;
import aima.core.agent.impl.AbstractAgent;
/**
* @author Ravi Mohan
*
*/
public class GameAgent extends AbstractAgent {
private Game game;
public GameAgent(Game g) {
this.game = g;
}
public void makeMiniMaxMove() {
game.makeMiniMaxMove();
}
pub... |
package aima.core.search.adversarial;
/**
* @author Ravi Mohan
*
*/
public class AlphaBeta {
private int alpha;
private int beta;
public AlphaBeta(int alpha, int beta) {
this.alpha = alpha;
this.beta = beta;
}
public int alpha() {
return alpha;
}
public void setAlpha(int alpha)... |
package aima.core.search.online;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import aima.core.agent.Action;
import aima.core.agent.Percept;
import aima.core.agent.impl.AbstractAgent;
import aima.core.agent.impl.NoOpAction;
import aima.core.search.frame... |
package aima.core.search.online;
import java.util.HashMap;
import java.util.Set;
import aima.core.agent.Action;
import aima.core.agent.Percept;
import aima.core.agent.impl.AbstractAgent;
import aima.core.agent.impl.NoOpAction;
import aima.core.search.framework.HeuristicFunction;
import aima.core.search.fram... |
package aima.core.search.online;
import aima.core.search.framework.ActionsFunction;
import aima.core.search.framework.DefaultStepCostFunction;
import aima.core.search.framework.GoalTest;
import aima.core.search.framework.StepCostFunction;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): page 14... |
package aima.core.search.framework;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import aima.core.agent.Action;
import aima.core.util.datastructure.Queue;
/**
* Artificial... |
package aima.core.search.framework;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): page 92.
*
* The evaluation function is construed as a cost estimate, so the node with the lowest evaluation
* is expanded first.
*/
/**
* @author Ciaran O'Reilly
*
*/
public interface Evaluation... |
package aima.core.search.framework;
import aima.core.agent.Action;
/**
* Returns one for every action.
*
* @author Ravi Mohan
*/
public class DefaultStepCostFunction implements StepCostFunction {
public double c(Object stateFrom, Action action, Object stateTo) {
return 1;
}
} |
package aima.core.search.framework;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
import aima.core.agent.Action;
import aima.core.agent.Percept;
import aima.core.agent.impl.AbstractAgent;
import aima.core.agent.impl.NoOpAction;
/**
* @author Ravi Mohan
*
*/
public ... |
package aima.core.search.framework;
import aima.core.agent.Percept;
/**
* This interface is to define how to Map a Percept to a State representation
* for a problem solver within a specific environment. This arises in the
* description of the Online Search algorithms from Chapter 4.
*/
/**
* @author ... |
package aima.core.search.framework;
import aima.core.agent.Action;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): page 67.
*
* A description of what each action does; the formal name for this is the
* transition model, specified by a function RESULT(s, a) that returns the state
* that r... |
package aima.core.search.framework;
import java.util.ArrayList;
import java.util.List;
import aima.core.agent.Action;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): Figure 3.10, page 79.<br>
*
* Figure 3.10 Nodes are the data structures from which the search tree is constructed. Each
... |
package aima.core.search.framework;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): page 67.
*
* The goal test, which determines whether a given state is a goal state.
*/
/**
* @author Ravi Mohan
*
*/
public interface GoalTest {
boolean isGoalState(Object state);
} |
package aima.core.search.framework;
/**
* Checks whether a given state equals an explicitly specified goal state.
*
* @author Ruediger Lunde
*/
public class DefaultGoalTest implements GoalTest {
private Object goalState;
public DefaultGoalTest(Object goalState) {
this.goalState = goalState;
}
... |
package aima.core.search.framework;
import java.util.Comparator;
import java.util.List;
import aima.core.agent.Action;
import aima.core.util.datastructure.PriorityQueue;
/**
* @author Ravi Mohan
*
*/
public abstract class PrioritySearch implements Search {
protected QueueSearch search;
public L... |
package aima.core.search.framework;
import java.util.ArrayList;
import java.util.List;
import aima.core.agent.Action;
import aima.core.agent.impl.NoOpAction;
/**
* @author Ravi Mohan
*
*/
public class SearchUtils {
public static List<Action> actionsFromNodes(List<Node> nodeList) {
List<Action>... |
package aima.core.search.framework;
import java.util.List;
import aima.core.agent.Action;
/**
* @author Ravi Mohan
*
*/
public interface Search {
List<Action> search(Problem p) throws Exception;
Metrics getMetrics();
} |
package aima.core.search.framework;
import java.util.List;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): Figure 3.7, page 77.
* <code>
* function TREE-SEARCH(problem) returns a solution, or failure
* initialize the frontier using the initial state of the problem
* loop do
* if... |
package aima.core.search.framework;
import java.util.Hashtable;
import java.util.Set;
/**
* @author Ravi Mohan
*
*/
public class Metrics {
private Hashtable<String, String> hash;
public Metrics() {
this.hash = new Hashtable<String, String>();
}
public void set(String name, int i) {
hash... |
package aima.core.search.framework;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): page 66.
*
* A problem can be defined formally by five components: <br>
* <ul>
* <li>The <b>initial state</b> that the agent starts in.</li>
* <li>A description of the possible <b>actions</b> available to ... |
package aima.core.search.framework;
import java.util.ArrayList;
import java.util.List;
import aima.core.agent.Action;
/**
* @author Ravi Mohan
*
*/
public class NodeExpander {
public static final String METRIC_NODES_EXPANDED = "nodesExpanded";
protected Metrics metrics;
public NodeExpander()... |
package aima.core.search.framework;
import java.util.Collections;
import java.util.List;
import aima.core.agent.Action;
import aima.core.util.CancelableThread;
import aima.core.util.datastructure.Queue;
/**
* @author Ravi Mohan
* @author Ciaran O'Reilly
*/
public abstract class QueueSearch extends No... |
package aima.core.search.framework;
import java.util.Set;
import aima.core.agent.Action;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): page 67.
*
* Given a particular state s, ACTIONS(s) returns the set of actions that can be
* executed in s. We say that each of these actions is <b>ap... |
package aima.core.search.framework;
import aima.core.agent.impl.DynamicAction;
/**
* A NoOp action that indicates a CutOff has occurred in a search. Used
* primarily by DepthLimited and IterativeDeepening search routines.
*/
/**
* @author Ciaran O'Reilly
*/
public class CutOffIndicatorAction extend... |
package aima.core.search.framework;
import java.util.List;
import aima.core.agent.Action;
/**
* A specialization of the GoalTest interface so that it is possible to check
* the solution once a Goal has been identified to determine if it is
* acceptable. This allows you to continue searching for alternati... |
package aima.core.search.framework;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): page 78.
*
*/
/**
* @author Ciaran O'Reilly
*
*/
public class PathCostFunction {
public PathCostFunction() {
}
/**
*
* @param n
* @return the cost, traditionally denoted by g(n), of ... |
package aima.core.search.framework;
import aima.core.agent.Action;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): page 68.
*
* The <b>step cost</b> of taking action a in state s to reach state s'
* is denoted by c(s, a, s').
*/
/**
* @author Ravi Mohan
* @author Ciaran O'Reilly
... |
package aima.core.search.framework;
/**
* An interface describing a problem that can be tackled from both directions
* at once (i.e InitialState<->Goal).
*/
/**
* @author Ciaran O'Reilly
*
*/
public interface BidirectionalProblem {
Problem getOriginalProblem();
Problem getReverseProblem();
}... |
package aima.core.search.framework;
/**
* Artificial Intelligence A Modern Approach (3rd Edition): page 92.
*
* a heuristic function, denoted h(n):<br>
* h(n) = estimated cost of the cheapest path from the state at node n to a goal state.<br>
*
* Notice that h(n) takes a node as input, but, unlike g(... |
package aima.core.search.framework;
import java.util.ArrayList;
import java.util.List;
import aima.core.agent.Action;
import aima.core.agent.Percept;
import aima.core.agent.State;
import aima.core.agent.impl.AbstractAgent;
import aima.core.agent.impl.NoOpAction;
import aima.core.util.Util;
/**
* Artifi... |
package aima.core.logic.propositional.visitors;
import java.util.HashSet;
import java.util.Set;
import aima.core.logic.propositional.parsing.ast.Sentence;
import aima.core.logic.propositional.parsing.ast.Symbol;
import aima.core.logic.propositional.parsing.ast.UnarySentence;
import aima.core.util.SetOps;
/... |
package aima.core.logic.propositional.visitors;
import java.util.Set;
import aima.core.logic.propositional.parsing.PLVisitor;
import aima.core.logic.propositional.parsing.ast.BinarySentence;
import aima.core.logic.propositional.parsing.ast.FalseSentence;
import aima.core.logic.propositional.parsing.ast.MultiSe... |
package aima.core.logic.propositional.visitors;
import java.util.HashSet;
import java.util.Set;
import aima.core.logic.propositional.parsing.ast.Sentence;
import aima.core.logic.propositional.parsing.ast.Symbol;
/**
* @author Ravi Mohan
*
*/
public class SymbolCollector extends BasicTraverser {
@... |
package aima.core.logic.propositional.visitors;
import java.util.HashSet;
import java.util.Set;
import aima.core.logic.propositional.parsing.ast.Sentence;
import aima.core.logic.propositional.parsing.ast.Symbol;
import aima.core.logic.propositional.parsing.ast.UnarySentence;
import aima.core.util.SetOps;
/... |
package aima.core.logic.propositional.visitors;
import java.util.Set;
import aima.core.logic.propositional.parsing.ast.Sentence;
import aima.core.logic.propositional.parsing.ast.Symbol;
import aima.core.util.SetOps;
/**
* @author Ravi Mohan
*
*/
public class SymbolClassifier {
public Set<Symbol> ... |
package aima.core.logic.propositional.visitors;
import aima.core.logic.propositional.parsing.AbstractPLVisitor;
import aima.core.logic.propositional.parsing.ast.BinarySentence;
import aima.core.logic.propositional.parsing.ast.Sentence;
import aima.core.logic.propositional.parsing.ast.UnarySentence;
/**
* @au... |
package aima.core.logic.propositional.visitors;
import aima.core.logic.propositional.parsing.PLVisitor;
import aima.core.logic.propositional.parsing.ast.BinarySentence;
import aima.core.logic.propositional.parsing.ast.FalseSentence;
import aima.core.logic.propositional.parsing.ast.MultiSentence;
import aima.core... |
package aima.core.logic.propositional.visitors;
import java.util.HashSet;
import java.util.Set;
import aima.core.logic.propositional.parsing.ast.BinarySentence;
import aima.core.logic.propositional.parsing.ast.Sentence;
import aima.core.logic.propositional.parsing.ast.Symbol;
import aima.core.logic.propositio... |
package aima.core.logic.propositional.parsing;
import java.util.ArrayList;
import java.util.List;
import aima.core.logic.common.LogicTokenTypes;
import aima.core.logic.common.ParseTreeNode;
import aima.core.logic.common.Parser;
import aima.core.logic.common.Token;
import aima.core.logic.propositional.parsing... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.