src/machinelearning/Dataset.java
public void arffFile(String filename, Game game, int estimate) {
		File directory = new File("results/datasets/");
		if (!directory.exists())
			directory.mkdirs();
		File outputFile = new File("results/datasets/"+filename+".arff");
		String nl = System.getProperty("line.separator");

        try(BufferedWriter writer = new BufferedWriter(new FileWriter(outputFile))) {
        	writer.write("% AUTHOR:           Viktor Toman"+nl);
			writer.write("% FILE:             "+filename+nl);
        	writer.write("% STATES ESTIMATED: "+estimate+nl);
        	writer.write("% STATES GENERATED: "+game.stateSize+nl);
        	writer.write("% STATEVARP1:       "+game.varStateP1no()+nl);
        	writer.write("% STATEVARP2:       "+game.varStateP2no()+nl);
        	writer.write("% ACTIONVARP1:      "+game.varActionP1no()+nl);
        	writer.write("% ACTIONVARP2:      "+game.varActionP2no()+nl);
        	writer.write("% PLAYER:           "+player+nl);
        	writer.write("% OBJECTIVE:        "+objective+nl);
        	writer.write("% NUMYES:           "+numYES+nl);
        	writer.write("% NUMNO:            "+numNO+nl);
        	writer.write("% NUMTOT:           "+((int)(numNO+numYES))+nl);
        	writer.write("@RELATION strategy"+nl+nl);

        	for (int i=0; i<attributes.size(); i++) {
            	writer.write("@ATTRIBUTE \""+attributes.get(i)+"\" {0,1}"+nl);
        	}
        	writer.write("@ATTRIBUTE \"class\" {yes,no}"+nl+nl);

        	writer.write("@DATA"+nl);
        	for (int i=0; i<instances.size(); i++) {
        		for (int j=0; j<instances.get(i).attValues.size(); j++)
        			writer.write((instances.get(i).attValues.get(j)?1:0)+",");
        		writer.write((instances.get(i).classValue?"yes":"no")+nl);
        	}
        } catch (Exception e) {
        	System.out.println(e);
        }
	}
/** Creates an arff file with the dataset in the Attribute-Relation File Format <br>
	 *  Location: results/datasets/filename.arff
	 * @param filename The name of the arff file
	 * @param game     Game instance
	 * @param estimate Estimate size of state space
	 * */
Creates an arff file with the dataset in the Attribute-Relation File Format 
Location: results/datasets/filename.arff
@param filename The name of the arff file
@param game     Game instance
@param estimate Estimate size of state space
Creates an arff file with the dataset in the Attribute - Relation File Format Location : results / datasets / filename . arff @param filename The name of the arff file @param game Game instance @param estimate Estimate size of state space
public void arffFile(String filename, Game game, int estimate) {
		File directory = new File("results/datasets/");
		if (!directory.exists())
			directory.mkdirs();
		File outputFile = new File("results/datasets/"+filename+".arff");
		String nl = System.getProperty("line.separator");
        try(BufferedWriter writer = new BufferedWriter(new FileWriter(outputFile))) {
        	writer.write("% AUTHOR:           Viktor Toman"+nl);
			writer.write("% FILE:             "+filename+nl);
        	writer.write("% STATES ESTIMATED: "+estimate+nl);
        	writer.write("% STATES GENERATED: "+game.stateSize+nl);
        	writer.write("% STATEVARP1:       "+game.varStateP1no()+nl);
        	writer.write("% STATEVARP2:       "+game.varStateP2no()+nl);
        	writer.write("% ACTIONVARP1:      "+game.varActionP1no()+nl);
        	writer.write("% ACTIONVARP2:      "+game.varActionP2no()+nl);
        	writer.write("% PLAYER:           "+player+nl);
        	writer.write("% OBJECTIVE:        "+objective+nl);
        	writer.write("% NUMYES:           "+numYES+nl);
        	writer.write("% NUMNO:            "+numNO+nl);
        	writer.write("% NUMTOT:           "+((int)(numNO+numYES))+nl);
        	writer.write("@RELATION strategy"+nl+nl);
        	for (int i=0; i<attributes.size(); i++) {
            	writer.write("@ATTRIBUTE \""+attributes.get(i)+"\" {0,1}"+nl);
        	}
        	writer.write("@ATTRIBUTE \"class\" {yes,no}"+nl+nl);
        	writer.write("@DATA"+nl);
        	for (int i=0; i<instances.size(); i++) {
        		for (int j=0; j<instances.get(i).attValues.size(); j++)
        			writer.write((instances.get(i).attValues.get(j)?1:0)+",");
        		writer.write((instances.get(i).classValue?"yes":"no")+nl);
        	}
        } catch (Exception e) {
        	System.out.println(e);
        }
	}
public void arffFile ( String filename , Game game , int estimate ) { File directory = new File ( "results/datasets/" ) ; if ( ! directory . exists ( ) ) directory . mkdirs ( ) ; File outputFile = new File ( "results/datasets/" + filename + ".arff" ) ; String nl = System . getProperty ( "line.separator" ) ; try ( BufferedWriter writer = new BufferedWriter ( new FileWriter ( outputFile ) ) ) { writer . write ( "% AUTHOR:           Viktor Toman" + nl ) ; writer . write ( "% FILE:             " + filename + nl ) ; writer . write ( "% STATES ESTIMATED: " + estimate + nl ) ; writer . write ( "% STATES GENERATED: " + game . stateSize + nl ) ; writer . write ( "% STATEVARP1:       " + game . varStateP1no ( ) + nl ) ; writer . write ( "% STATEVARP2:       " + game . varStateP2no ( ) + nl ) ; writer . write ( "% ACTIONVARP1:      " + game . varActionP1no ( ) + nl ) ; writer . write ( "% ACTIONVARP2:      " + game . varActionP2no ( ) + nl ) ; writer . write ( "% PLAYER:           " + player + nl ) ; writer . write ( "% OBJECTIVE:        " + objective + nl ) ; writer . write ( "% NUMYES:           " + numYES + nl ) ; writer . write ( "% NUMNO:            " + numNO + nl ) ; writer . write ( "% NUMTOT:           " + ( ( int ) ( numNO + numYES ) ) + nl ) ; writer . write ( "@RELATION strategy" + nl + nl ) ; for ( int i = 0 ; i < attributes . size ( ) ; i ++ ) { writer . write ( "@ATTRIBUTE \"" + attributes . get ( i ) + "\" {0,1}" + nl ) ; } writer . write ( "@ATTRIBUTE \"class\" {yes,no}" + nl + nl ) ; writer . write ( "@DATA" + nl ) ; for ( int i = 0 ; i < instances . size ( ) ; i ++ ) { for ( int j = 0 ; j < instances . get ( i ) . attValues . size ( ) ; j ++ ) writer . write ( ( instances . get ( i ) . attValues . get ( j ) ? 1 : 0 ) + "," ) ; writer . write ( ( instances . get ( i ) . classValue ? "yes" : "no" ) + nl ) ; } } catch ( Exception e ) { System . out . println ( e ) ; } }
Creates an arff file with the dataset in the Attribute-Relation File Format <br>
  Location: results/datasets/filename.arff
 @param filename The name of the arff file
 @param game     Game instance
 @param estimate Estimate size of state space
Creates an arff file with the dataset in the Attribute - Relation File Format <br > Location : results / datasets / filename . arff @param filename The name of the arff file @param game Game instance @param estimate Estimate size of state space