% A11 Driver

global nodes num_nodes
num_nodes = 0;
nodes = [];

r00 = AI_decision_tree_learning([ ], [ ], 0, 'AI_choose_rand');
num_nodes = 0;
nodes = [];
r01 = AI_decision_tree_learning([ ], [ ], 1, 'AI_choose_rand');
num_nodes = 0;
nodes = [];
r11 = AI_decision_tree_learning([0 0 0; 0 1 0], [ ], 0, 'AI_choose_rand');
num_nodes = 0;
nodes = [];
r10 = AI_decision_tree_learning([0 0 1; 0 1 1], [ ], 1, 'AI_choose_rand');
num_nodes = 0;
nodes = [];
clear attributes
attributes(1).name = 'Alt';
attributes(1).values = [0 1];
attributes(1).include = 0;
r20 = AI_decision_tree_learning([0 0 1; 0 1 0], attributes, 1, 'AI_choose_rand');

attributes(1).name = 'Alt';
attributes(1).values = [0,1];
attributes(1).include = 1;
attributes(2).name = 'Bar';
attributes(2).values = [0,1];
attributes(2).include = 1;
attributes(3).name = 'Fri';
attributes(3).values = [0,1];
attributes(3).include = 1;
attributes(4).name = 'Hun';
attributes(4).values = [0,1];
attributes(4).include = 1;
attributes(5).name = 'Pat';
attributes(5).values = [0,1,2];
attributes(5).include = 1;
attributes(6).name = 'Pri';
attributes(6).values = [0,1,2];
attributes(6).include = 1;
attributes(7).name = 'Rai';
attributes(7).values = [0,1];
attributes(7).include = 1;
attributes(8).name = 'Res';
attributes(8).values = [0,1];
attributes(8).include = 1;
attributes(9).name = 'Typ';
attributes(9).values = [0,1,2,3];
attributes(9).include = 1;
attributes(10).name = 'Est';
attributes(10).values = [0,1,2,3];
attributes(10).include = 1;

ex = [1 0 0 1 1 2 0 1 0 0 1 1;
      1 0 0 1 2 0 0 0 2 2 1 0;
      0 1 0 0 1 1 0 0 3 0 1 1;
      1 0 1 1 2 1 0 0 2 1 1 1;
      1 0 1 0 2 2 0 1 0 3 1 0;
      0 1 0 1 1 1 1 1 1 0 1 1;
      0 1 0 0 0 0 1 0 3 0 1 1;
      0 0 0 1 1 1 1 1 2 0 1 1;
      0 1 1 0 2 0 1 0 3 3 1 0;
      1 1 1 1 2 2 0 1 1 1 1 0;
      0 0 0 0 0 0 0 0 2 0 1 0;
      1 1 1 1 2 0 0 0 3 2 1 1];
num_nodes = 0;
nodes = [];

r31 = AI_decision_tree_learning(ex, attributes, 1, 'AI_choose_rand');
  