zulu.baseline
Class RemoteOracle

java.lang.Object
  extended by zulu.baseline.RemoteOracle
All Implemented Interfaces:
Oracle

public class RemoteOracle
extends java.lang.Object
implements Oracle

The communication interface with the server of the project. It is a child of the Oracle interface.


Method Summary
 java.util.Vector<java.lang.String> getAlphabet()
           
 int getCountMQ()
           
 java.util.Vector<java.lang.String> iThinkIFound()
          Lock the task and get the test sample.
 boolean membershipQuery(java.lang.String word)
          Execute a membership query
 float submit(java.lang.String r)
          Submit a classification of the test sample
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getAlphabet

public java.util.Vector<java.lang.String> getAlphabet()
Specified by:
getAlphabet in interface Oracle
Returns:
The characters of the alphabet recognized by the target DFA

iThinkIFound

public java.util.Vector<java.lang.String> iThinkIFound()
Description copied from interface: Oracle
Lock the task and get the test sample. Membership queries are not allowed after the use of this method.

Specified by:
iThinkIFound in interface Oracle
Returns:
The test sample

membershipQuery

public boolean membershipQuery(java.lang.String word)
                        throws ReachedLimitException
Description copied from interface: Oracle
Execute a membership query

Specified by:
membershipQuery in interface Oracle
Returns:
True if the string belong to the target DFA, or False
Throws:
ReachedLimitException

submit

public float submit(java.lang.String r)
Description copied from interface: Oracle
Submit a classification of the test sample

Specified by:
submit in interface Oracle
Returns:
The score (correctly classified strings*100/size of test set)

getCountMQ

public int getCountMQ()
Specified by:
getCountMQ in interface Oracle