Not logged in. · Lost password · Register

riwo
Member for 2 months
7 posts
Subject: Kalah competition classpath
I'm sorry but I'm not that experienced in programming with java. Could someone please quickly explain to me whats meant by

"please put your agent in the classpath info.kwarc.teaching.AI.Kalah.WS1920.agents
If you use additional objects/classes, please put them in a unique namespace extending info.kwarc.teaching.AI.Kalah.WS1920.agents"

from the readme file of the kalah github project
Thanks!
jfschaefer
Member for 2 months
29 posts
I don't know Java that well myself, but here is how I understand it:

If you have an agent RiwoAgent, you shoud have a file RiwoAgent.java, which looks roughly like this:
    package info.kwarc.teaching.AI.Kalah.WS1920.agents;
    import info.kwarc.teaching.AI.Kalah.Agents.Agent;
    import info.kwarc.teaching.AI.Kalah.util.*;
    public class RiwoAgent extends Agent {    ....    }
the important part here is the first line that sets the package.

You may also have some helper classes. To avoid collisions with helper classes by other agents, you should put them in a special package, like this:
    package info.kwarc.teaching.AI.Kalah.WS1920.agents.riwoagent;
    public class Helper {    ....    }

I think that the folder structure should also match the package name.

Important: the class name RiwoAgent and the class path extension riwoagent should be chosen uniquely (i.e. in a way that nobody else will choose it).

I hope this helps :)
riwo
Member for 2 months
7 posts
Yes this helped a lot. Thanks!
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Datenschutz | Kontakt
Powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2011 by Yves Goergen