public int getPerceptIndex( String percept ){
        if( percept.equals(SOLVED) ){
            return (getPerceptsNumber() - 1);
        }else{
            int[] values = new int[2];
            int k = 0;
            try {
                StreamTokenizer tokenizer = new StreamTokenizer(new StringReader(
                        percept));
                while (k < 2 && tokenizer.nextToken() != StreamTokenizer.TT_EOF) {
                    if (tokenizer.ttype == StreamTokenizer.TT_NUMBER) {

                        values[k] = (int) (tokenizer.nval);
                        k++;
                    }
                }
                return values[0] * DIGITS + values[1];
            } catch (Exception e) {
                return -1;
            }
        }
    }