|
From: <jom...@us...> - 2008-04-29 21:04:10
|
Revision: 1278
http://jason.svn.sourceforge.net/jason/?rev=1278&view=rev
Author: jomifred
Date: 2008-04-29 14:03:59 -0700 (Tue, 29 Apr 2008)
Log Message:
-----------
add ant for the official team
Modified Paths:
--------------
trunk/applications/jason-team/AC-Local-Dummies.mas2j
trunk/applications/jason-team/src/java/arch/LocalWorldModel.java
trunk/applications/jason-team/src/java/jia/Search.java
Added Paths:
-----------
trunk/applications/jason-team/contest.xml
Modified: trunk/applications/jason-team/AC-Local-Dummies.mas2j
===================================================================
--- trunk/applications/jason-team/AC-Local-Dummies.mas2j 2008-04-28 20:54:41 UTC (rev 1277)
+++ trunk/applications/jason-team/AC-Local-Dummies.mas2j 2008-04-29 21:03:59 UTC (rev 1278)
@@ -15,32 +15,32 @@
host="localhost", port=12300, username=botagent1, password="1"]
agentArchClass arch.ACArchitecture
agentClass agent.SelectEvent
- beliefBaseClass agent.UniqueBelsBB("gsize(_,_)","steps(_)","cell(_,_,key)","corral(_,_,_,_)","pratio(_)");
+ beliefBaseClass agent.UniqueBelsBB("gsize(_,_)","steps(_)","cell(_,_,key)","corral(_,_,_,_)");
dummy2 dummy.asl
[verbose=1,host="localhost", port=12300, username=botagent2, password="2"]
agentArchClass arch.ACArchitecture
agentClass agent.SelectEvent
- beliefBaseClass agent.UniqueBelsBB("gsize(_,_)","steps(_)","cell(_,_,key)","corral(_,_,_,_)","pratio(_)");
+ beliefBaseClass agent.UniqueBelsBB("gsize(_,_)","steps(_)","cell(_,_,key)","corral(_,_,_,_)");
dummy3 dummy.asl
[verbose=1,host="localhost", port=12300, username=botagent3, password="3"]
agentArchClass arch.ACArchitecture
agentClass agent.SelectEvent
- beliefBaseClass agent.UniqueBelsBB("gsize(_,_)","steps(_)","cell(_,_,key)","corral(_,_,_,_)","pratio(_)");
+ beliefBaseClass agent.UniqueBelsBB("gsize(_,_)","steps(_)","cell(_,_,key)","corral(_,_,_,_)");
dummy4 dummy.asl
[verbose=1,host="localhost", port=12300, username=botagent4, password="4"]
agentArchClass arch.ACArchitecture
agentClass agent.SelectEvent
- beliefBaseClass agent.UniqueBelsBB("gsize(_,_)","steps(_)","cell(_,_,key)","corral(_,_,_,_)","pratio(_)");
+ beliefBaseClass agent.UniqueBelsBB("gsize(_,_)","steps(_)","cell(_,_,key)","corral(_,_,_,_)");
dummy5 dummy.asl
[verbose=1,host="localhost", port=12300, username=botagent5, password="5"]
agentArchClass arch.ACArchitecture
agentClass agent.SelectEvent
- beliefBaseClass agent.UniqueBelsBB("gsize(_,_)","steps(_)","cell(_,_,key)","corral(_,_,_,_)","pratio(_)");
+ beliefBaseClass agent.UniqueBelsBB("gsize(_,_)","steps(_)","cell(_,_,key)","corral(_,_,_,_)");
dummy6 dummy.asl
[verbose=1,host="localhost", port=12300, username=botagent6, password="6"]
agentArchClass arch.ACArchitecture
agentClass agent.SelectEvent
- beliefBaseClass agent.UniqueBelsBB("gsize(_,_)","steps(_)","cell(_,_,key)","corral(_,_,_,_)","pratio(_)");
+ beliefBaseClass agent.UniqueBelsBB("gsize(_,_)","steps(_)","cell(_,_,key)","corral(_,_,_,_)");
aslSourcePath: "src/asl";
}
Added: trunk/applications/jason-team/contest.xml
===================================================================
--- trunk/applications/jason-team/contest.xml (rev 0)
+++ trunk/applications/jason-team/contest.xml 2008-04-29 21:03:59 UTC (rev 1278)
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!--
+
+ This file was generated by Jason 1.1
+ http://jason.sf.net
+
+ April 10, 2008 - 23:19:55
+-->
+
+<project name ="jason_team"
+ basedir="."
+ default="run">
+
+ <property name="mas2j.project.file" value="AC-official.mas2j"/>
+ <property name="debug" value=""/> <!-- use "-debug" to run in debug mode -->
+ <property name="build.dir" value="${basedir}/bin/classes" />
+
+ <property name="jasonJar" value="../../lib/jason.jar"/>
+
+ <path id="project.classpath">
+ <pathelement location="${basedir}"/>
+ <pathelement location="${build.dir}"/>
+ <pathelement location="${jasonJar}"/>
+ <fileset dir="${basedir}/lib" > <include name="*.jar" /> </fileset>
+
+ </path>
+
+ <!-- tasks the user can override in his/her c-build.xml script -->
+ <target name="user-init">
+ <copy file="../jason-moise/lib/jmoise.jar" todir="lib" />
+ <copy file="../jason-moise/lib/moise.jar" todir="lib" />
+ </target>
+ <target name="user-end">
+ </target>
+
+ <target name="init">
+ <mkdir dir="${build.dir}" />
+ <antcall target="user-init" />
+ </target>
+
+ <target name="compile" depends="init">
+ <condition property="srcdir" value="${basedir}/src/java" else="${basedir}" >
+ <available file="${basedir}/src/java" />
+ </condition>
+ <javac srcdir="${srcdir}" destdir="${build.dir}" debug="true" optimize="true" >
+ <classpath refid="project.classpath"/>
+ </javac>
+ </target>
+
+ <target name="run" depends="compile" >
+ <echo message="Running project ${ant.project.name}" />
+ <java classname="jason.infra.centralised.RunCentralisedMAS"
+ failonerror="true" fork="yes" dir="${basedir}" >
+ <classpath refid="project.classpath"/>
+ <arg line="${mas2j.project.file} ${debug} "/>
+ <jvmarg line="-Xmx750M"/>
+ </java>
+ <antcall target="user-end" />
+ </target>
+
+ <target name="clean" >
+ <delete failonerror="no" includeEmptyDirs="true" verbose="true">
+ <fileset dir="${basedir}" includes="**/*.class"/>
+ </delete>
+ </target>
+</project>
Modified: trunk/applications/jason-team/src/java/arch/LocalWorldModel.java
===================================================================
--- trunk/applications/jason-team/src/java/arch/LocalWorldModel.java 2008-04-28 20:54:41 UTC (rev 1277)
+++ trunk/applications/jason-team/src/java/arch/LocalWorldModel.java 2008-04-29 21:03:59 UTC (rev 1278)
@@ -23,30 +23,22 @@
*/
public class LocalWorldModel extends WorldModel {
- int[][] visited; // count the visited locations
- int minVisited = 0; // min value for near least visited
+ int[][] visited; // count the visited locations
+ int minVisited = 0; // min value for near least visited
- private Random random = new Random();
+ private Random random = new Random();
- Set<Vec> cows = new HashSet<Vec>();
- boolean isCowsUptodate = false;
+ Set<Vec> cows = new HashSet<Vec>();
+ boolean isCowsUptodate = false;
- int[][] cowsrep; // cows repulsion
- int[][] agsrep; // agents repulsion
- int[][] obsrep; // obstacle repulsion
+ int[][] cowsrep; // cows repulsion
+ int[][] agsrep; // agents repulsion
+ int[][] obsrep; // obstacle repulsion
- BeliefBase bb; // agent's BB
+ BeliefBase bb; // agent's BB
//private Logger logger = Logger.getLogger("jasonTeamSimLocal.mas2j." + LocalWorldModel.class.getName());
- //public static LocalWorldModel create(int w, int h, int nbAg) {
- // return new LocalWorldModel(w,h,nbAg);
- //}
-
- //public LocalWorldModel(int w, int h) {
- // this(w, h, 6);
- //}
-
public LocalWorldModel(int w, int h, int nbAg, BeliefBase bb) {
super(w, h, nbAg);
this.bb = bb;
Modified: trunk/applications/jason-team/src/java/jia/Search.java
===================================================================
--- trunk/applications/jason-team/src/java/jia/Search.java 2008-04-28 20:54:41 UTC (rev 1277)
+++ trunk/applications/jason-team/src/java/jia/Search.java 2008-04-29 21:03:59 UTC (rev 1278)
@@ -22,7 +22,7 @@
public static final int DIST_FOR_AG_OBSTACLE = 2;
- final LocalWorldModel model;
+ final LocalWorldModel model;
final Location from, to;
final boolean considerAgentsAsObstacles;
final boolean considerCorralAsObstacles;
@@ -69,6 +69,7 @@
}
this.maxDistFromCluster = 4;
+ model.getCows(); // to update the cows in model.
}
public void setMaxDistFromCluster(int m) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|