Information Based Model Exploration · MEng Computer Science Final Year Project Information Based...

115
University of Hertfordshire MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry d[email protected] supervised by Prof. Daniel Polani September, 2016

Transcript of Information Based Model Exploration · MEng Computer Science Final Year Project Information Based...

Page 1: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

University of Hertfordshire

MEng Computer Science Final Year Project

Information Based Model Exploration

Daniel Barry

[email protected]

supervised byProf. Daniel Polani

September, 2016

Page 2: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

Abstract

In this project we look at information gain as an effective approach to model exploration. We tackletwo main problems, the fake coin problem and a camera angle limit search problem. Previous worktowards self-modelling agents has failed to address the use of an information-theoretic driven search. Inorder to achieve this, recursively averaging information gain was used to update an internal Bayesianmodel to the agent. To test the effectiveness of this idea, two pieces of software were written for eachproblem with the information gain analysed at different depths and compared with a random actionsearch agent. From the experiments explained in this project, we see that an information-theoreticapproach is effective, with the recursive benefit depending on whether there are local maximums in thesearch.

Page 1

Page 3: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

Contents

1 Introduction 31.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2 Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.3 Report Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.4 Project Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

2 Background 62.1 Literature Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.2 Background of Bayesian Inference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72.3 Background of Information Theory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

3 Problem Statement 93.1 Problem Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.2 Difficulties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.3 Assumptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.4 Constraints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

4 Methodology 104.1 Coin Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

4.1.1 Random Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114.1.2 1 Layer Information Gain Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . 114.1.3 2 Layer Information Gain Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . 114.1.4 3 Layer Information Gain Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

4.2 Camera Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114.2.1 Random Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134.2.2 1 Layer Information Gain Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . 134.2.3 2 - 6 Layer Information Gain Exploration . . . . . . . . . . . . . . . . . . . . . . . . . 134.2.4 7 Layer Information Gain Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.2.5 8 Layer Information Gain Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . 144.2.6 Open-Loop Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

5 Results 155.1 Coin Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155.2 Camera Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

6 Discussion 176.1 Coin Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

6.1.1 Random Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176.1.2 1 Layer Information Gain Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . 176.1.3 2 Layer Information Gain Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . 176.1.4 3 Layer Information Gain Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . 176.1.5 Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

6.2 Camera Problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176.2.1 Random Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186.2.2 1 Layer Information Gain Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . 186.2.3 2 - 5 Layer Information Gain Exploration . . . . . . . . . . . . . . . . . . . . . . . . . 186.2.4 Limit Of Information Gain Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . 186.2.5 Open-Loop Exploration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186.2.6 Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19

7 Conclusion 20

Page 2

Page 4: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

8 Evaluation 218.1 Critical Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

8.1.1 Choice of Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218.1.2 Project Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218.1.3 Performance Measures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218.1.4 Knowledge of Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

8.2 Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228.2.1 Use of Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228.2.2 Model Storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228.2.3 Optimisation of Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

9 References 23

10 Appendix 2410.1 Coin Problem Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

10.1.1 run.sh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2610.1.2 build.xml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2710.1.3 Main.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2810.1.4 Problem.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3010.1.5 RandomSearch.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3110.1.6 InformationGain.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3610.1.7 PROBLEM SOLVER.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4110.1.8 ACTION STATE.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4210.1.9 SENSE STATE.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4310.1.10 WORLD STATE.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4410.1.11 COIN.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

10.2 Camera Problem Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4610.2.1 run.sh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4710.2.2 build.xml . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4810.2.3 Main.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4910.2.4 Environment.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5010.2.5 BasicEnv.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5210.2.6 LoopEnv.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5510.2.7 Agent.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5810.2.8 BasicAgent.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5910.2.9 InfoUtil.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6210.2.10 Interface.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6410.2.11 Terminal.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6510.2.12 GUI.java . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66

10.3 Coin Problem Raw Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6910.4 Camera Problem Raw Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8410.5 Camera Problem Open-Loop Raw Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

Page 3

Page 5: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

1 Introduction

The aim of this project is to explore how model exploration may be achieved through a series of simplerproblems, which should demonstrate how spatial exploration is feasible given a small amount of information.

1.1 Motivation

The general research direction is towards the particular issue posed by modelling humanoid robotics inRoboCup - as the problem is considered it to be sufficiently difficult in order to further the rate of progressin robotics and artificial intelligence [1] [2].

Specifically, the interest in RoboCup comes from the University team, Bold Hearts [17]. With the newestchallenge of 3D printing larger robots to help overcome the issues associated with the addition of artificialgrass to the problem, the team now looks towards an effective way to control such a large structure.

Figure 1, generated from table 1, shows there has been a general push towards larger robots in the competi-tion with the introduction of artificial grass [7], posing a problem for simple walk gaits, which typically reliedon predictable surfaces and reduced motor noise. More dynamic walking algorithms such as Zero MomentPoint (ZMP) rely on accurate model descriptions in order to infer data such as centre of mass [8].

Figure 1: For the 2015 RoboCup World Cup the astro-turf was introduced to the game as part of manyincremental changes towards the 2050 goal.

The general areas for research in the generalised topic of self-modelling agents are considered as thefollowing:

• Efficient agent model exploration – Given the current agent model, what experiment can be done tomaximise the amount the agent learns about itself?

• Storage of abstract robotic models – Given a noisy agent model, how can an agent store just the abstractinformation that best describes what has be learned?

These have been identified as the initial problems to be solved in order to have self-modelling agents andwill be updated as more areas of research are discovered. The focus of this project is research in effectiveagent model exploration and the multiple challenges described in the “Problem Statement” section. In thisproject we look to validate the use of Information Theory as an effective method of agent model exploration.

Page 4

Page 6: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

Year Placement Team Height2016 1st Rhoban Football Club 56cm2016 2nd ZJUDancer 58cm2016 3rd CIT Brains 60cm2015 1st CIT Brains Kid 60cm2015 2nd ZJUDancer 80cm2015 3rd Rhoban Football Club 56cm2014 1st CIT Brains 60cm2014 2nd Bold Hearts 45cm2014 3rd Baset Kid-Size 84cm2013 1st Team DARwIn 45cm2013 2nd AUTMan 58cm2013 3rd ZJUDancer 58cm

Table 1: The top three winning places in the humanoid kid-sized league for four years. Source: Robotspecifications from [3], [4], [5] & [6].

1.2 Challenges

The challenges of this project can be expressed to be the following:

• Finding interesting but simple problems that exploit underlying features of search, that may show it’sweaknesses and strengths as an effective model explorer.

• Comparing the effectiveness of the search in a useful way so that search performance is clear.

• Writing code that is as true to the model as possible.

1.3 Report Structure

The “Background” section we review the various existing works, as well as a review of the methods used inthis project.

In the “Problem Statement” section we discuss the overall problem description, difficulties, assumptions andconstraints of the project.

Moving onto the “Literature Review” section, we look at current efforts for self-modelling agents and demon-strate the difference between those and the direction in which this project takes.

Next we have the “Methodology” section, describing the experiment setup, limitations and what we aimedto learn from conducting them.

For the “Results” section we show a high-level, processed version of the data, as well as information abouthow it was generated.

Furthermore, the data is studied in the “Discussion” section, where we discuss what has been observed fromthe data and what we can learn from our observations.

The “Conclusion” section should be relatively self-evident as we collate and condense what has been learnedfrom the series of experiments.

Looking at the “Evaluation” section offers a critical review of the project and the future direction of thenext projects.

The “References” offer sources for the information cited, whilst the “Appendix” offers the source code usedin the project, as well as the raw data used to draw conclusions from.

Page 5

Page 7: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

1.4 Project Statement

The purpose of this project is to evaluate information driven exploration as an effective method for modelexploration, exploring the benefits of recursive search.

Page 6

Page 8: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

2 Background

2.1 Literature Review

A method for self-modelling agents used by Josh Bongard et al, currently use a Genetic Algorithm (GA) forexploration, where the best solution acts as a baseline for the next generation [9]. In this work they show howthe robot can recover from simulated damage and continue to move under it’s own power in a given directionwhich is a nice result. The exploration relies on randomly produced models with the idea that a closelymatching model is picked, which essentially involves internally simulating many models. With larger degreesof freedom, the probability of randomly producing a partially acceptable model decreases significantly. Theinteractions between limbs is relatively low with their hardware and the different structures that the GAexplores is relatively low, making the exploration using a GA easier.

This approach is formally described as a estimation-exploration algorithm (EEA) which relies on the simula-tion of many internal models as previously described, where fitness is based on how well matched perceiveddata is with input [10]. For the estimation phase a GA is used to generate 100 models, that vary in termsof masses and sensor lag (time delay for a given sensor). The fittest 50 models are used to cross breed andgenerate a further 50 models, which then replace the 50 lowest fitness models. This is continued over 30generations until a model is produced.

In the exploration phase they also have 100 genomes for 30 generations, but in this phase the genomes map-to neural networks. These neural networks act as controllers, which are tested against the model producedin the estimation phase. They are then rated on the distance achieved over 1000 time steps. The result ofthis phase is output to the robot.

The results of this work is a robot that successfully constructs itself from a large number of assumptionsabout what is allowed to be a target model, including the number of parts, angle limitations, masses of partsand where sensors are located. The amount of error in this modelling is relatively low, which is one of themany gains from switching to an information theory approach to exploration.

A novel approach to this subject area is to look at how humans explore, specifically in the act of browsingfor media in the paper: “A Model For Information Exploration” [11]. Here they attempt to quantify userinteraction with a media system that not too dissimilar to the navigation capabilities offered by moderninternet. What’s interesting here is that it is not too different from the methodology that will be describedlater. An experiment is performed, in this case in the form of selecting media, the content is evaluated anda decision is made from what has been learned until a goal has been reached. It is interesting to see how ourapproach may be relatable to the way in which humans search to gain information.

In “Information Based Adaptive Robotic Exploration” we see that a successful information driven robotexploration of the world, where the robot is tasked with mapping out an indoor environment [12]. The ex-ploration proposed in this approach uses an Occupancy Grid, thus relying on accurate location data in orderto correctly associate input data with the correct grid in order to build the model. Here information densityis used to improve the accuracy of the model to be stored using feature-based Simultaneous LocalisationAnd Mapping (SLAM).

Moving towards work closely related to this project, we have “Model based Bayesian Exploration”, whichis focused on delivering a short sighted approximation to information related to each action in the currentstate when exploring a world model [13]. The result of this paper is a method to balance exploration andexploitation when choosing actions, as well as how to update Bayesian belief states using Markov DecisionProcesses.

Essentially what we ultimately plan to do is search a large space for non-linear relationships in high dimen-sions, something that kernels, deep-learning and other such practices are capable of but obscure the actualrelationships. What currently isn’t clear is how these relationships can be optimally explored given that weknow there is a relationship based on a fundamental set of rules - even if we don’t know what those rulesare.

The plan for this project is to experiment with model exploration in terms of information theory, using theentropy of the internal model to identify areas worthy of exploration [14]. The reason to prefer information

Page 7

Page 9: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

theory over a GA as previously discussed is that in future projects we will have to deal with channel noiseand in preparation for this, it makes sense to use methods already prepared with theory on how to tacklethese issues.

With this method of exploration, we will look to reduce the entropy and increase the information in themodel, where information gained is defined by − log(p) and expected information is defined by −p · log(p)The problem is changed within this project in order to reflect the benefits of an information driven approachfor model exploration.

2.2 Background of Bayesian Inference

Bayes’ Theorem, named after Thomas Bayes who proved a special case [18], is a method in which we candeduce the correctness of several hypothesis through a method of storing the probability of them beingcorrect. In the case of this project, we store the possible model states, referred to as world states in thecontext of the experiment. We keep going until it is clear that only one world state is possible, therefore weknow the model.

For the simplicity of the project, we take a naive approach to Bayesian inference as seen in equation 1, wehave our possible model states, W , sense states, s and action states, a.

p(s|a) =∑W

p(s|W,a) · p(W ) (1)

For each problem, we shall give the following description:

W ∈ {W1,W2, ..,Wn}A ∈ {A1, A2, .., An}S ∈ {S1, S2, .., Sn}

(2)

Which shows which model states are possible for the given problem, which action states an agent may takeand the possible sense states an agent may make.

2.3 Background of Information Theory

Information theory, or communication theory as first proposed by Claude Shannon in 1948, is where the keyconcept of entropy is outlined as a measurement of information [14].

An initial use of information theory based work was conducted at Bell Labs, the work place of Shannon,for the purpose of increasing the speed at which telegraphs could be sent over a noisy channel. This workwas conducted by Harry Nyquist in 1924, specifically looking at the rate in which “intelligence” could betransmitted, something which was later formalised by Shannon [15].

The concept of entropy is the amount of information contained in a message transmitted from transmitterto receiver. This allows us to formally look at the information in the original message, the information lostthrough transmission, the compression of the information in the message, the redundancy, etc. Informationtheory is of course much further reaching than telegraph lines and has extended to compression, cryptography,general communication, physics and much more.

In this project, we’re specifically interested in knowing how many bits of information are required to representa state. We measure the information with equation 3, where S is the Bays state and o is an observation.

H(S|o) = −∑S

p(s|o) · log2 p(s|o) (3)

The state S, represents the probability of a corresponding world state W (as seen in equation 2), as a correcthypothesis.

Page 8

Page 10: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

This of course is not enough to to determine which is better, we must know what is gained by our potentialexperiment given our current model. The information gain is described by:

I(S|o) = h(s)− h(s|o) (4)

Page 9

Page 11: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

3 Problem Statement

3.1 Problem Description

Formally, the problem is how to explore a discrete, unknown state space effectively and show that this datais suitable for building a model.

3.2 Difficulties

The following are considered to be the difficulties of the project:

• Demonstrating the performance gain on an arbitrary problem.

• Validating whether the approach is effective.

3.3 Assumptions

In our approach we assume the following in our experiments:

• Actuators do not have noise. An example may be a motor having noise to the position it’s set.

• Sensors do not have noise. Sensors are usually not perfect, particularly if they offer any kind ofresolution.

• World does not have noise, such as movement or change of some type that for a static agent could beconsidered as noise.

• The internal model does not have noise, such as randomness or unreliability in the storage and calcu-lation methods.

• We know the structure of the model.

• We are able to test for the model.

3.4 Constraints

In general, the only real constraint is the scope of the project, which in turn is set by the resources allocatedto the project. The problem of humanoid model exploration is a complex and lengthy pursuit, somethingthat cannot be tackled without first investing time into the individual issues posed by the problem. Thisproject tackles a simplified version of the issue posed by exploring a large, unknown state space.

Additional limitations will be discussed in the “Critical Review” section of this project.

Page 10

Page 12: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

4 Methodology

Here we describe multiple experiments, how they are conducted and what we aim to learn from them. Inthe “Evaluation” section we look at what has been learned, ultimately driving the next experiment in thissection. When reading, it may be useful for the purpose of order to read back and forth between the sections.

4.1 Coin Problem

With our first problem, we want to explore information driven exploration with a problem that is simple toimplement and easy to understand practically. With this problem we can validate how an information drivenapproach would be developed and whether there is any advantage over random exploration. The problemselected is an adapted version of the fake coin problem as this is a problem we practically validate to ensureit’s working correctly [16].

Our adapted version of the problem is as follows:

• There are four coins and one of them is fake, where the fake one is either lighter or heavier than theothers and this is unknown. The model is aware of the number of coins and fake coins.

• The model may read the current state of the scales, as either weighted to the left, to the right or even.The state of the coins can be on the scales (left or right) and off the scales.

In figure 2 we see a visualisation of the coin problem where a coin action, A, can be in the state left, L right,R, or off, O. This real world model can be expressed as:

A = {L,R,O} (5)

Figure 2: The possible positions of the coin in our version of the problem.

In figure 2 we can see that setting all the coins to the left side of the scales would produce a left bias, Land the opposite for a right hand bias, R. Additionally, setting all the coins off the scales or having equalweight either side of the scale will mean there is no bias and therefore is balanced, B. This sense, S, can berepresented as:

S = {L,R,B} (6)

Each coin has an additional state associated with it, in the form of whether it is the fake coin. A fake coincan be either light, L, or heavy, H. A coin may also be normal, N , which gives us the following:

C = {L,H,N} (7)

Page 11

Page 13: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

Lastly, the Bayes model, W , is set to represent our hypothesis about the coins using the terms in equation 7:

W1 = [L,N,N,N ]

W2 = [N,L,N,N ]

W3 = [N,N,L,N ]

W4 = [N,N,N,L]

W5 = [H,N,N,N ]

W6 = [N,H,N,N ]

W7 = [N,N,H,N ]

W8 = [N,N,N,H]

(8)

4.1.1 Random Exploration

Here we set the bench mark with random exploration to set a performance benchmark. Here the Bayesianmodel is updated using the random actions taken by the action.

4.1.2 1 Layer Information Gain Exploration

The purpose of this experiment is to test whether evaluating the possible information gain of taking a givenaction gives us an advantage when compared with taking random actions.

4.1.3 2 Layer Information Gain Exploration

Given the results of the previous test, we look to see whether there is gain in looking one layer down in thesearch tree.

4.1.4 3 Layer Information Gain Exploration

Lastly, we look to see whether any information can be gained in addition to one layer search for the problemby looking through all of the layers the problem should be searching.

4.2 Camera Problem

The camera problem is an attempt to bring a spatial element to the search problem given the analysis fromthe previous problem’s experiments, where the agent is a fixed position camera with control over it’s angle.The rules applied to the agent is as follows:

• An agent is only able to move left or right one space.

• The world is of fixed size (determined at the start of the simulation) and the agent has access to thisinformation.

• Requesting left or right at a limit will not allow the agent to move.

• The agent can only sense the current position it is in and not further out. For example, an agent candetect a limit only when on that limit.

In figure 3 each possible camera angle maps to a discrete position, in this case also representing a locationin which we hypothesize that a limit may be. This is used in our Bayes probabilities, where there are twodistinct features that define a possible mode, a left limit and a right limit. The thick arrow represents thecurrent camera direction which can be in any of the world positions. The camera can only gain informationfrom the state it’s currently in, meaning that in state 3 it is unaware of states 2 or 4, unless it has previouslybeen in those states and processed them internally.

Page 12

Page 14: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

Figure 3: A basic version of the camera problem, outlining how the agent can interact with the environment.

A simple four position problem would look like the following:

W1 = [L,R,N,N ]

W2 = [L,N,R,N ]

W3 = [L,N,N,R]

W4 = [N,L,R,N ]

W5 = [N,L,N,R]

W6 = [R,L,N,N ]

W7 = [N,N,L,R]

W8 = [R,N,L,N ]

W9 = [N,R,L,N ]

W10 = [R,N,N,L]

W11 = [N,R,N,L]

W12 = [N,N,R,L]

(9)

For the equation 9, the possible world states are described by the left limit, L, the right limit, R, and nolimit, N .

Actions that may be taken are described as either left, L, or right, R. This means an action state is definedas:

A = {L,R} (10)

The sense states are defined as left limit, L, right limit, R, and N - as defined in equation 9:

S = {L,R,N} (11)

Page 13

Page 15: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

In figure 4 we see the visual implementation of what have been discussed above, with the blue line representingthe left limit, green line the right limit and the red line the current position of the camera.

Figure 4: The GUI representation of the problem for the purpose of debugging and demoing the program.

Additionally, in this problem it has been necessary to set limits as to how long we allow the problem toprocess. This limit was set to 100 as initial experimentation suggested most random searches had completedby this point.

4.2.1 Random Exploration

Here we want a baseline comparison for the performance of the information driven search method. Ourmethod should in theory be better than random actions being taken. For the purpose of the experimentshaving a reasonably timed end, the problems have been kept small.

4.2.2 1 Layer Information Gain Exploration

Like the coin problem, we now look at the advantages of exploring the problem based on the expectedinformation gain.

4.2.3 2 - 6 Layer Information Gain Exploration

From the previous results, we want to see whether there is any increase in benefit from exploring furtherlayers.

Page 14

Page 16: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

4.2.4 7 Layer Information Gain Exploration

A further experiment to see whether a limitation has been met in the amount of increase seen in depthexploration.

4.2.5 8 Layer Information Gain Exploration

To understand whether there is any change in behaviour when the depth explored is the same size of theenvironment.

4.2.6 Open-Loop Exploration

In these experiments, all previous experiments on this problem are repeated in order to explore how theproblems behave on an open-loop problem, where the limits are removed. The environment has been set topermanently open so that the specific behaviour can be isolated, although the agent still has to determinethat all previous world states are not valid.

Page 15

Page 17: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

5 Results

5.1 Coin Problem

Below is a comparison of the different types of experiments as explained in the “Methodology” section, wherethe average result is from raw data in the Appendix (“Coin Problem Raw Results”).

Exploration Type AverageRandom 15.3546453546

1 Layer Information Gain 3.24275724282 Layer Information Gain 3.24575424583 Layer Information Gain 3.2577422577

Table 2: A comparison of the different search experiments performed.

5.2 Camera Problem

Here is a comparison of the of the different experiments outlined in the “Methodology” section, where wehave the average result with the limit results excluded and the percentage of experiments that failed to reacha result. The raw results can again be seen in the Appendix (“Camera Problem Raw Results”).

Exploration Type Average Failure (%)Random 21.7446373851 2.1978021978

1 Layer Information Gain 5.5788667688 34.76523476522 Layer Information Gain 5.6780551905 23.9760239763 Layer Information Gain 6.3220747889 17.18281718284 Layer Information Gain 6.6230769231 9.09090909095 Layer Information Gain 7.0671487603 3.29670329676 Layer Information Gain 7.3436563437 07 Layer Information Gain 7.4805194805 08 Layer Information Gain 7.2957042957 0

Table 3: A comparison of the different search experiments performed.

Figure 5: A graph showing the failure rate.

Page 16

Page 18: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

Figure 6: A graph showing the steps till solution.

Table 4 contains the results collected from the open-loop version of this problem.

Exploration Type Average Failure (%)Random 21.5994005994 0

1 Layer Information Gain 7 02 Layer Information Gain 7 03 Layer Information Gain 7 04 Layer Information Gain 7 05 Layer Information Gain 7 06 Layer Information Gain 7 07 Layer Information Gain 7 08 Layer Information Gain 7 0

Table 4: A comparison of the different search experiments performed in the open-loop scenario of the cameraproblem.

Page 17

Page 19: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

6 Discussion

6.1 Coin Problem

These experiments refer to table 2.

6.1.1 Random Exploration

In table 2, for the random exploration we see that the problem takes a significant number of moves to solve.This is because a step towards progress is equally matched by step away from progress. There are threepossible positions for the coin to be in. The probability of a coin being placed in a given position is 1

3 and

the probability of all the coins being in a given state is 12

4.

It is expected that only a given number of states infer new information and therefore help solve the problem,but as the particular states change per randomly generated problem it is difficult avenue to explore. It’sworth noting that no limit was required on the problem as the number of distinct possible states is small,meaning that randomness can easily explore most in little time and therefore infer the fake coin.

6.1.2 1 Layer Information Gain Exploration

This experiment gave us a significant gain on random exploration, at about 4.7 times better it shows itselfas an affective method for exploration as expected. At just over 3 comparisons on average, this matched thebest solution that could be achieved as a human too.

From this experiment, it appears it may be useful to look specifically at whether there is continued gain bylooking at other depths.

6.1.3 2 Layer Information Gain Exploration

Unfortunately, this experiment didn’t show any gain, something which was expected. The reason for thisseems to be that one layer look ahead seems to be ample to distinguish any future gain there is to have.Doing those most optimal move for the current state is also the most optimal move for any future movestoo. There’s no need to do something counter-intuitive for gain.

Moving forward, we shall look at three layer gain exploration encase there is any gain to be had by seeingthe entire tree when making decisions.

6.1.4 3 Layer Information Gain Exploration

As expected, there was no gain from performing this experiment. For this particular problem there doesn’tappear to be any benefit from sacrificing a current gain in order for future gain.

6.1.5 Evaluation

This appears to be a special case of exploration where a greedy search implementation is just as affective asan information gain driven one, due to there not being cases where a local sacrifice in information is requiredin order to gain globally.

With this, we want to design a problem that is more likely to require a local loss of information in order tomodel the world in less steps. In order to get this demonstration, we need a problem with the concept of alocal maximum and global maximums. The simplest example we could think of to demonstrate this was the“Camera Problem””, as seen in the “Methodology” section.

6.2 Camera Problem

These experiments refer to table 3.

Page 18

Page 20: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

6.2.1 Random Exploration

Firstly, with the expectation of this experiment not being a simple as the last and that the agent may getstuck at a local minima and unable to complete the problem, a limit was set on how long it was deemedreasonable to wait for an agent to find a solution. The failure percentage is the number of incidents wherewe see that hit the set limit, potentially taking infinite time to complete.

The random exploration set a pretty low benchmark to beat, being much lower than simply turning left 8times and then right 8 times, which would mean 16 moves using an inefficient algorithm. That said, thenumber of failure cases is low, at about 2.2% it’s able to find a solution in a reasonable amount of time.

6.2.2 1 Layer Information Gain Exploration

With the failure cases removed, the one layer exploration method looks suspiciously efficient. After somemanual debugging, it appears that the it’s because the agent can only solve simple cases where not muchmovement is required. What raises the number is the bias to move left or right when the information gainis even and no preference exists.

On average we can assume that the limits are set opposite to one another, meaning there is half the distancebetween them. Assuming a bias to the right hand side, we automatically gain the benefit of a lookahead for7 positions. Then we consider the agent’s capability, which is the information they currently have and onestep left or right. This gives us:

((1L + 0 + 1R)/3) + ((2R + 3R + 4R + 5R + 6R + 7R + 8R)/7) = 5.6 (12)

The letter after the number is an indication to which side the value is associated with. This agrees approxi-mately what we have seen.

6.2.3 2 - 5 Layer Information Gain Exploration

Following these experiments, we see the failure rate deduce as it becomes less and less likely the agent willbecome stuck at a local maximum as the agent can effectively see further and further, as seen in figure 5.Given more lookahead capability, the agent is able to take a short-term sacrifice when given the possibility ofgaining information in a future state. The average also comes up as it starts to better represent all possiblestates and not dismissing the cases where the agent is stuck. In figure 6 we it level off as the increase insearch depth no longer yields any benefits, with infinite values (, steps greater than or equal to 100,) nolonger having to be removed.

6.2.4 Limit Of Information Gain Exploration

Exploring down to layers 6, 7 and 8 we clearly see no gain from further exploration. This of course makessense as once you have found a limit, no further exploration as you don’t need to explore a limit you’re onand the other limit. 8states− 2limits gives us the 6 lookahead states required to find a solution.

6.2.5 Open-Loop Exploration

For this environment, looking at the random search implementation we see a drop in failure rate for theopen-loop version of this problem and a slight decrease in the number of steps required to find a solution. Forthe other layers, there is no information gain from going left or right, so it defaults to one side after seeingno preference. Of course, the agent needs to explore the entirety of the environment in order to discoverthat there is in fact no limits in the environment.

The last aspect of the results worthy of note is the failure rate, which is 0. This does not come as a surpriseas agent is not able to get stuck and therefore reach a state where it cannot escape a local maximum. Thisdoes validate that the implementation works correctly and our previous theory about the failure rate beingdue to the agent becoming stuck on a limit.

Page 19

Page 21: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

6.2.6 Evaluation

It is evident we have been able to demonstrate what we set out to achieve with this problem, which istemporary non-obvious movement in order to gain information.

Page 20

Page 22: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

7 Conclusion

In this project, we want to know whether information driven exploration is an effective method for modelexploration and if recursive search adds any additional advantage when compared to search at a single depth.This was set as an initial goal in order to validate information theory as a valid approach for future works.

Looking at the coin problem, we see that random exploration for small problems is relatively effective andsets a good benchmark for any algorithm to compete with it. The random search always returned a solutionin the end, taking on average approximately 15 moves before randomly stumbling taking the correct actionsthat allow the Bayes model to come to a conclusion.

Next we investigated the implementation of searching one layer ahead using an information driven approach.This gave us a significant improvement when compared with random search as expected. What wasn’tinitially expected was the that this produced the most optimal solution. Recursive search didn’t give us anyincreased advantage, meaning that a greedy algorithm is fully able to solve the coin problem optimally.

This result did mean that the coin problem wasn’t able to demonstrate whether a recursive search is able toenhance the speed in which we can derive a solution. It was decided that a simple problem was needed inorder to determine whether a recursive search could navigate itself out of a scenario where it is possible toget stuck at a local maxima.

The problem that seemed suitable was the camera problem, where there are left and right limits to explore.With this problem it was possible to get stuck at one of the limits, where there was zero information gain froman immediate decision to turn left or right. This result was later confirmed by a further set of experimentswith no limits given to the agent.

The random implementation again set a good benchmark for what is to be bettered upon, with the more layersthe better up until the search depth was six layers down, at which point there was no further performancegain. Interestingly we also saw that percentage of time the agent was stuck in it’s exploration also decreaseddrastically as the search depth increased.

From these results, we see that information-driven exploration could be considered a replacement for the GAused by Bongard et al’s work on self-modelling agents, potentially allowing the complexity of the problemto be increased also. As the potential candidates for correct models decreases, the speed at which correctmodels can be isolated should increase.

The advantage with this approach is that a further reduction in physical experimentation is required, as theinformation gain from each experiment should be significantly increased from that of semi-random actions.This of course is an important feature when hardware as a resource is both costly and time consuming tomaintain, whereas computation becomes increasingly cheap in comparison.

Page 21

Page 23: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

8 Evaluation

8.1 Critical Review

8.1.1 Choice of Language

Unfortunately, Java as a choice of language for exploring mathematical ideas was not ideal. Several timesthere were problems that extended through the language, such as:

• Accuracy issues with dealing with small numbers. Normalising on the same array of double valuescan return different results, despite not changing the numbers. Doing the same experiment twiceintroduces minor discrepancies. As the search depths grew greater, the more noticeable this issue was.The values returned typically ranged from −0.0 to < ±1 × 1014 after normalisation. This is becausethe normalisation method sums the set of values, divides 1 by the sum and times each value in theset by that number. A world of size N has a Bays model of size n.(n− 1), meaning if it is size 16 (asit was during testing), there were 240 unique states. Over several calls it’s possible to see this errorpropagate in the normalisation process.

• Visualisation of concepts isn’t intuitive in Java and actually requires a lot of time to working on howthe back end and front end will work together, as the display thread is blocked by the worker thread,causing the GUI to appear unresponsive to the Operating System and crashing the program. On topof this, for arbitrary diagrams you’re also required to manually figure out how to draw the displaythrough basic shapes, hence why the visualisation of the camera problem is so basic. Other languagessuch as C# do appear to offer a more intuitive ability to interact with the display.

There are some positive points with Java, though:

• Clear structures for primitives and core classes means that it’s possible to make some assumptionsabout how the code will operate. If an array of double values is created, you can make guaranteesthat the variable won’t suddenly be replaced with a String for example.

• Speed is more than good, with on-the-fly speed improvements from Just-In Time (JIT) execution,making experiments fast to run. Some experiments took a number of hours to run, which may havebeen much more if the language wasn’t as fast as it is.

It is currently unclear whether there is a language that encapsulates all of the requirements this project hashad, but is certainly worth an investment of time to prevent the same teething problems seen in this project.

8.1.2 Project Scope

In hindsight, it’s better to start off with a small idea and expand on it. At the start of the project therewas a lot of time and resources wasted on ideas that were too broad to write about, let alone to considerexperimenting with. As a result a lot of initial experimentation was not included in this report due to eitherbeing incomplete or not yielding any results.

8.1.3 Performance Measures

Ideally, it would have been good to compare the results from the model exploration as discussed in the“Background” section. As part of their experimentation, Bongard et al were using a relatively complex star-shaped robot with real hardware, making a direct comparison difficult. Exploring whether their solutionwas strictly an optimisation to a robotics platform or more general ended up outside of project due to thecomplexity.

8.1.4 Knowledge of Area

It was clear that after a good section of the way through the project that there was a gap knowledge of themathematics behind the project. Admittedly this did hinder the writing of the code for the experiments,meaning at one particular point it was not worth while correcting the problem programmed given the option

Page 22

Page 24: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

of starting again.

With future projects there is certainly benefit to prototyping a basic idea to check that it is both understoodand feasible to be included as part of the project. Validating the feasibility of a method as part of a solutionalso validates the understanding on that problem.

8.2 Future Work

8.2.1 Use of Information

In our exploration search, we choose the best average information gain from our searching. It may beinteresting to explore the effects of using a MaxMax, MinMax or MaxMin algorithm for determining thenext action for an agent to take.

This may in turn lead to interesting questions, such as “Is it more important to retrieve some informationfrom an experiment, rather than trying to retrieve the maximum information from an experiment?”. “Whatexploration behaviour does MinMax inhibit?”

8.2.2 Model Storage

Particularly for the problem of exploring robotic structures, we have a compact form in which power isdelivered to a joint which can be modelled as a series of wheels with limbs attached. In theory, there maybe infinite structures in which are reasonably possible for a robot to be made and a discrete approach maynot be appropriate. It’s not yet clear how information could be used to infer a specific model in a possiblyinfinite space.

8.2.3 Optimisation of Search

One line of discussion whilst conducting the experiment was how to skip having to search every possiblestate in the space, by looking at where linear relationships might occur in the Bayes model. This in turncould allow for faster searching over large search spaces. The idea is to have a probability associated withan unexplored Bayes world state that indicates the how likely it is to inherit a linear property set by localvalues.

Page 23

Page 25: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

9 References

[1] Kitano, H. “RoboCup-97: Robot Soccer World Cup I”, Springer, Vol. 1, 1997

[2] RoboCup Federation. “Objective - The Dream”, URL: http://www.robocup.org/about-robocup/

objective/, 2016

[3] RoboCup Federation. “Qualified teams for RoboCup 2016”, URL: https://www.robocuphumanoid.org/hl-2016/teams/, 2016

[4] RoboCup Federation. “Qualified teams for RoboCup 2015”, URL: https://www.robocuphumanoid.org/hl-2015/teams/, 2015

[5] RoboCup Federation. “Qualified teams for RoboCup 2014”, URL: https://www.robocuphumanoid.org/hl-2014/teams/, 2014

[6] RoboCup Federation. “Qualified teams for RoboCup 2013”, URL: https://www.robocuphumanoid.org/hl-2013/teams/, 2013

[7] RoboCup Federation. “Rules”, URL: https://www.robocuphumanoid.org/materials/rules/, 2015

[8] Vukobratovic, M., Borovac, B. “Zero-Moment Point - Thirty Five Years of it’s Life”, International Journalof Humanoid Robotics, Vol. 1, No. 1, pp. 157-173, 2004.

[9] Bongard, J., Zykov, V., Lipson, H. “Resilient Machines Through Continuous Self-Modeling”, Science,Vol. 314, No. 5802, pp. 1118-1121, 2006.

[10] Bongard, J., Lipson, H. “Automatic Synthesis of Multiple Internal Models Through Active Exploration”,AAAI Fall Symposium: From Reactive to Anticipatory Cognitive Embodied Systems, 2005.

[11] Waterworth, J., Chignell, M. “A Model of Information Exploration”, Hypermedia, Vol. 3, pp. 35-58,1991.

[12] Bourgault, F., Makarenko, A., Williams, S., Grocholsky, B., Durrant-Whyte, H. “Information BasedAdaptive Robotic Exploration”, IEEE/RSJ International Conference: Intelligent Robots and Systems,Vol. 1, 2002.

[13] Dearden, R., Friedman, N., Andre, D. “Model based Bayesian Exploration”, Proceedings of the FifteenthConference on Uncertainty in Artificial Intelligence, Vol. 15, pp. 150-159, 1999.

[14] Shannon, C. “A Mathematical Theory of Communication”, The Bell System Technical Journal, Vol. 27,pp. 379-423, 623-656, 1948.

[15] Nyquist, H. “Certain Factors Affecting Telegraph Speed”, The Bell System Technical Journal, Vol. 3,pp. 324-346, 1924.

[16] Levitin, A., Levitin, M. “Algorithmic Puzzles”, Oxford University Press, Vol. 10, 2011.

[17] Bold Hearts. “Bold Hearts - The University of Hertfordshire RoboCup Team”, URL: http://robocup.herts.ac.uk/, 2015

[18] Bayes, M. “An Essay towards Solving a Problem in the Doctrine of Chances. By the Late Rev. Mr.Bayes, F. R. S. Communicated by Mr. Price, in a Letter to John Canton, A. M. F. R. S.”, PhilosophicalTransactions, Vol. 53, pp. 370-418, 1763.

Page 24

Page 26: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10 Appendix

In this section of report we see the source code to various problems discussed in the project (titled “CoinProblem Source Code” and “Camera Problem Source Code”), as well as the raw results (“Coin ProblemRaw Results” and “Camera Problem Raw Results”), for the purpose of transparency and accountability.

Page 25

Page 27: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.1 Coin Problem Source Code

In this section is the source code for the coin problem. Please contact [email protected] for readaccess to:

• https://bitbucket.org/danielbarry/final-year-project

[email protected]:danielbarry/final-year-project.git

Page 26

Page 28: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.1.1 run.sh

#!/ bin /bash

func t i on t e s t {cd d i s t

r e s u l t=$ ( java − j a r co in . j a r $1 )readarray −t y <<<” $ r e s u l t ”f o r i in ”${y [@]} ”do

echo −e $ i | grep ”##”done

cd . .}

f unc t i on main {f o r x in {0 . . 1000}do

t e s t $1done

}

main $1

Page 27

Page 29: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.1.2 build.xml

<?xml ve r s i on=” 1 .0 ” encoding=”UTF−8”?><p ro j e c t name=” co in ” d e f au l t=” j a r ” ba s ed i r=” . ”>

<d e s c r i p t i o n>An experiment to t e s t f o r fake co in s .</ d e s c r i p t i o n>

<property name=” source . d i r ” l o c a t i o n=” s r c /” /><property name=” bu i ld . d i r ” l o c a t i o n=”bin /” /><property name=” j a r . d i r ” l o c a t i o n=” d i s t /” /><property name=”doc . d i r ” l o c a t i o n=”doc/” /><property name=”main . c l a s s ” value=”barray . co in .Main” /><property name=”main . j a r ” value=” co in . j a r ” />

<t a r g e t name=” c l ean ” d e s c r i p t i o n=”Clean B ina r i e s ”><de l e t e d i r=”${ bu i ld . d i r }” /><de l e t e d i r=”${ j a r . d i r }” />

</ ta r g e t>

<t a r g e t name=”doc” d e s c r i p t i o n=”Create Documentation”><de l e t e d i r=”${doc . d i r }” /><mkdir d i r=”${doc . d i r }” /><javadoc d e s t d i r=”${doc . d i r }”>

< f i l e s e t d i r=”${ source . d i r }” /></ javadoc>

</ ta r g e t>

<t a r g e t name=” compile ” depends=” c l ean ” d e s c r i p t i o n=”Compile Java Code”><mkdir d i r=”${ bu i ld . d i r }” /><javac s r c d i r=”${ source . d i r }” d e s t d i r=”${ bu i ld . d i r }” debug=” true ” inc ludeantrunt ime=”

f a l s e ” /></ ta r g e t>

<t a r g e t name=” j a r ” depends=” compi le ” d e s c r i p t i o n=”Create Jar F i l e ”><mkdir d i r=”${ j a r . d i r }” />< j a r d e s t f i l e=”${ j a r . d i r }/${main . j a r }” bas ed i r=”${ bu i ld . d i r }”>

<mani fe s t><a t t r i b u t e name=”Main−Class ” value=”${main . c l a s s }” />

</mani f e s t></ j a r>

</ ta r g e t>

<t a r g e t name=”run” depends=” j a r ” d e s c r i p t i o n=”Run Java App”><java j a r=”${ j a r . d i r }/${main . j a r }” f o rk=” true ” />

</ ta r g e t></ p r o j e c t>

Page 28

Page 30: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.1.3 Main.java

package barray . co in ;

/∗∗∗ Main . java∗∗ The main entry c l a s s where input from the user i s to be handled and the∗ program i s to be i n i t i a l i s e d .∗∗/

pub l i c c l a s s Main{/∗∗∗ main ( )∗∗ The main entry method f o r the program where user input i s passed and∗ analysed be f o r e the program in s t anc e i s generated and ran .∗∗ @param args The arguments from the te rmina l .∗∗/

pub l i c s t a t i c void main ( S t r ing [ ] a rgs ) {/∗ Create new problem ∗/Problem problem = new Problem ( ) ;/∗ Ask f o r the problem to be so lved ∗/i n t s e l e c t i o n = In t eg e r . pa r s e In t ( args [ 0 ] ) ;switch ( s e l e c t i o n ) {

case 0 :problem . s o l v e (PROBLEMSOLVER.RANDOM) ;break ;

case 1 :problem . s o l v e (PROBLEMSOLVER. INFO GAIN 1 DPTH) ;break ;

case 2 :problem . s o l v e (PROBLEMSOLVER. INFO GAIN 2 DPTH) ;break ;

case 3 :problem . s o l v e (PROBLEMSOLVER. INFO GAIN 3 DPTH) ;break ;

case 4 :problem . s o l v e (PROBLEMSOLVER. INFO GAIN 4 DPTH) ;break ;

case 5 :problem . s o l v e (PROBLEMSOLVER. INFO GAIN 5 DPTH) ;break ;

}}

/∗∗∗ l og ( )∗∗ Outputs a l og message to the standard output . This can then be grepped∗ from the output and loaded in to a data p ro c e s s o r as a CSV f i l e .∗∗ @param msgs An array o f S t r ing messages to be output .∗∗/

pub l i c s t a t i c void log ( S t r ing [ ] msgs ) {/∗ Display message on standard stream ∗/System . out . p r i n t ( ”>>,” ) ;/∗ I t e r a t e through messages ∗/f o r ( S t r ing s t r : msgs ) {

System . out . p r i n t ( s t r + ” , ” ) ;}/∗ Print new l i n e ∗/System . out . p r i n t l n ( ”” ) ;

}

/∗∗∗ e r r o r ( )∗

Page 29

Page 31: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

∗ Disp lays an e r r o r then e x i t s the program . I t i s assumed that the e r r o r i s∗ so bad that i t ’ s unsa fe f o r the program to cont inue .∗∗ @param msg The message to be d i sp layed to the user be f o r e e x i t i n g as a∗ reason f o r doing so .∗∗/

pub l i c s t a t i c void e r r o r ( S t r ing msg) {/∗ Display message on e r r o r stream ∗/System . e r r . p r i n t l n ( ”COIN [ ! ! ] ” + msg) ;/∗ Now ex i t ∗/e x i t ( ) ;

}

/∗∗∗ e x i t ( )∗∗ Exit s from the program with p r e j ud i c e . Anybody can c a l l but r e s ou r c e s are∗ not handled be f o r e death .∗∗/

pub l i c s t a t i c void e x i t ( ) {/∗ NOTE: Assume good e x i t . ∗/System . e x i t (0 ) ;

}}

Page 30

Page 32: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.1.4 Problem.java

package barray . co in ;

import java . u t i l .Random ;

/∗∗∗ Problem . java∗∗ The problem f u l l y expres sed .∗∗/

pub l i c c l a s s Problem{/∗∗∗ Problem ( )∗∗ The i n i t i a l i s e r f o r the problem .∗∗/

pub l i c Problem ( ) {/∗ TODO: I n i t i a l i s e the problem c o r r e c t l y . ∗/

}

/∗∗∗ s o l v e ( )∗∗ This method i s r e s p on s i b l e f o r s o l v i n g the problem based on the reques ted∗ s o l v e r and b locks un t i l the problem i s so lved .∗∗ @param so l v e r The type o f the s o l v e r to be used to s o l v e the problem .∗∗/

pub l i c void s o l v e (PROBLEMSOLVER so l v e r ) {/∗ Make sure a s o l v e r i s provided ∗/i f ( s o l v e r == nu l l ) {

Main . e r r o r ( ” So lve r should not be NULL” ) ;}/∗ Randomly produce problem problem ∗/i n t pos = (new Random( ) ) . next Int (WORLDSTATE. va lue s ( ) . l ength ) ;COIN [ ] prob = WORLDSTATE. va lue s ( ) [ pos ] . getWorldState ( ) ;/∗ Se l e c t the c o r r e c t s o l v e r ∗/switch ( s o l v e r ) {

case RANDOM :(new RandomSearch ( ) ) . p roc e s s ( prob ) ;break ;

case INFO GAIN 1 DPTH :(new InformationGain (1 ) ) . p roc e s s ( prob ) ;break ;

case INFO GAIN 2 DPTH :(new InformationGain (2 ) ) . p roc e s s ( prob ) ;break ;

case INFO GAIN 3 DPTH :(new InformationGain (3 ) ) . p roc e s s ( prob ) ;break ;

case INFO GAIN 4 DPTH :(new InformationGain (4 ) ) . p roc e s s ( prob ) ;break ;

case INFO GAIN 5 DPTH :(new InformationGain (5 ) ) . p roc e s s ( prob ) ;break ;

d e f au l t :Main . e r r o r ( ” So lve r not implemented” ) ;break ;

}}

}

Page 31

Page 33: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.1.5 RandomSearch.java

package barray . co in ;

import java . lang .Math ;import java . u t i l .Random ;

/∗∗∗ RandomSearch . java∗∗ This c l a s s i s r e s p on s i b l e f o r doing a random act i on based search .∗∗/

pub l i c c l a s s RandomSearch{/∗∗∗ Random( )∗∗ The i n i t i a l i s e r method f o r s o l v i n g the problem .∗∗/

pub l i c RandomSearch ( ) {/∗ Do nothing ∗/

}

/∗∗∗ proce s s ( )∗∗ Solve the problem given , b lock un t i l complete .∗∗ @param goa l The s o l u t i o n to the problem .∗∗/

pub l i c void proce s s (COIN [ ] goa l ) {/∗ Bayesian model ∗/double [ ] va lue s = new double [WORLDSTATE. va lue s ( ) . l ength ] ;/∗ Setup Bayesian model ∗/f o r ( i n t x = 0 ; x < WORLDSTATE. va lue s ( ) . l ength ; x++){

/∗ Setup the p r obab i l i t y o f each as equal ∗/va lue s [ x ] = 1 .0 / WORLDSTATE. va lue s ( ) . l ength ;

}/∗ Normalise out Bayesian model ∗/va lue s = normal i se ( va lue s ) ;/∗ Keep sea r ch ing un t i l one conc lu s i on i s found ∗/i n t count = 0 ;f o r ( ; ; ) {

count++;///∗ Log what we cu r r en t l y know ∗/// logData ( va lue s ) ;/∗ Calcu la te cur rent in fo rmat ion ∗/double w = getEntropy ( va lue s ) ;Main . l og (new St r ing [ ] { ”wor ld entropy ” , ”” + w}) ;/∗ I f the r e i s no world entropy , we have so lved the problem ∗/i f (w == 0) {

break ;}/∗ Calcu la te the best ac t i on to be taken at a g iven depth ∗/ACTION STATE [ ] bestCoins = getBestAct ion ( goa l . l ength ) ;/∗ Action on the s t a t e ∗/SENSE STATE measurement = getMeasurement ( bestCoins , goa l ) ;/∗ Update in fo rmat ion we gained in our world from the r e a l experiment ∗/va lue s = updateBayesian ( values , bestCoins , measurement ) ;

}/∗ Find out which s o l u t i o n we came to ∗/i n t s o l u t i o n = −1;f o r ( i n t x = 0 ; x < va lue s . l ength ; x++){

i f ( va lue s [ x ] == 1) {s o l u t i o n = x ;

}}/∗ Print the s o l u t i o n ∗/COIN [ ] so lvedCoins = WORLDSTATE. va lue s ( ) [ s o l u t i o n ] . getWorldState ( ) ;

Page 32

Page 34: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

f o r ( i n t x = 0 ; x < so lvedCoins . l ength ; x++){System . out . p r i n t l n ( ” so lvedCoins [ ” + x + ” ] −> ” + so lvedCoins [ x ] . t oS t r i ng ( ) ) ;

}/∗ Display the number o f i t e r a t i o n s r equ i r ed ∗/System . out . p r i n t l n ( ”##,” + count ) ;

}

/∗∗∗ getBestAct ion ( )∗∗ Randomly looks f o r the best ac t i on to be taken .∗∗ @param s i z e The s i z e o f the problem .∗∗ @return The best ac t i on s t a t e that was found .∗∗/

p r i va t e ACTION STATE [ ] getBestAct ion ( i n t s i z e ) {/∗ Hard−coded va lue s ∗/i n t numFake = 1 ;/∗ The ac t i on s t a t e co in s ∗/ACTION STATE [ ] bestCoins = new ACTION STATE[ s i z e ] ;/∗ Generate next ac t i on s t a t e ∗/Random rand = new Random( ) ;f o r ( i n t x = 0 ; x < s i z e ; x++){

bestCoins [ x ] = ACTION STATE. va lue s ( ) [ rand . next Int (ACTION STATE. va lue s ( ) . l ength ) ] ;}/∗ Return the ac t i on s t a t e co in s ∗/re turn bestCoins ;

}

/∗∗∗ getAvgInfo ( )∗∗ Ca l cu l a t e s the average in fo rmat ion gained from a move by sea r ch ing the∗ t r e e r e c u r s i v e l y to a g iven depth .∗∗ @param currentDepth The cur rent depth o f the r e cu r s i on .∗ @param currentWorldBay The cur rent world Bayesian given the r e c u r s i v e∗ depth .∗ @param co in s The proposed arrangement o f the co in s to be t e s t ed .∗ @return Average in fo rmat ion gained from act i on at a g iven depth .∗∗/

p r i va t e double getAvgInfo ( i n t currentDepth , double [ ] currentWorldBay , ACTION STATE [ ] c o in s) {

/∗ I t e r a t e through d i f f e r e n t s enso r opt ions f o r proposed senso r s t a t e s ∗/double avgInfo = 0 ;i n t avgCnt = 0 ;f o r (SENSE STATE ss : SENSE STATE. va lue s ( ) ) {

/∗ Calcu la te Bayesian model based on new in format ion ∗/double [ ] bay = updateBayesian ( currentWorldBay , co ins , s s ) ;/∗ Check whether the pr ed i c t ed s t a t e i s impos s ib l e ∗/double baySum = 0 ;f o r ( i n t x = 0 ; x < bay . l ength ; x++){

baySum += bay [ x ] ;}i f (baySum > 0) {

i f ( currentDepth > 1) {/∗ Al l p o s s i b l e ac t i on s t a t e s ∗/i n t wLen = WORLDSTATE. va lue s ( ) [ 0 ] . getWorldState ( ) . l ength ;i n t aLen = ACTION STATE. va lue s ( ) . l ength ;i n t aCombo = ( i n t ) (Math . pow( aLen , wLen) ) ;double avgLayerInfo = 0 ;f o r ( i n t z = 0 ; z < aCombo ; z++){

ACTION STATE [ ] nCoins = new ACTION STATE[wLen ] ;i n t ac t i on = z ;/∗ Figure out where each co in would be in each s t a t e ∗/f o r ( i n t y = 0 ; y < wLen ; y++){

nCoins [ y ] = ACTION STATE. va lue s ( ) [ a c t i on % aLen ] ;

Page 33

Page 35: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

ac t i on /= aLen ;}avgInfo += getAvgInfo ( currentDepth − 1 , bay , nCoins ) ;/∗ Add to average in fo rmat ion count ∗/avgCnt++;

}} e l s e {

/∗ Calcu la te the in fo rmat ion ∗/avgInfo += getEntropy ( bay ) ;/∗ Add to average in fo rmat ion count ∗/avgCnt++;

}}

}/∗ Average the in fo rmat ion gained ∗/i f ( avgCnt > 0) {

/∗ Calcu la te the average in fo rmat ion f o r gained in each s t a t e ∗/avgInfo /= avgCnt ;

} e l s e {/∗ TODO: Pos s ib ly t r oub l i ng case where no s t a t e s were p o s s i b l e and we are

f o r c ed to take an average due to r e cu r s i on . ∗/Main . e r r o r ( ”Unhandled entropy case h i t . ” ) ;

}/∗ Return the cur rent average in fo rmat ion as we have reached the end ∗/re turn avgInfo ;

}

/∗∗∗ updateBayesian ( )∗∗ Calcu la te the new va lues o f the Bayesian model based on the cur rent∗ Bayesian model and the g iven new in fo rmat ion .∗∗ @param bay The old Bayesian model .∗ @param pos The po s i t i o n o f the co in s as we prepared them f o r the experiment .∗ @param ss The new sensed s t a t e .∗ @return The new Bayesian model .∗∗/

p r i va t e s t a t i c double [ ] updateBayesian ( double [ ] bay , ACTION STATE [ ] pos , SENSE STATE ss ) {/∗ Make a copy o f prev ious array with new data ∗/double [ ] newBay = new double [ bay . l ength ] ;f o r ( i n t x = 0 ; x < bay . l ength ; x++){

/∗ Store o ld value ∗/newBay [ x ] = bay [ x ] ;/∗ Get the co in s f o r the proposed world s t a t e ∗/COIN [ ] c o i n s = WORLDSTATE. va lue s ( ) [ x ] . getWorldState ( ) ;/∗ Calcu la te the sense s t a t e we would p r ed i c t to s ee ∗/SENSE STATE pred i c t ed = getMeasurement ( pos , c o i n s ) ;/∗ Check i f that matches what we a c tua l l y saw ∗/i f ( p r ed i c t ed != s s ) {

/∗ Can ’ t be a c o r r e c t hypothes i s − wipe i t ∗/newBay [ x ] = 0 ;

}}r e turn normal i s e (newBay) ;

}

/∗∗∗ getMeasurement ( )∗∗ Gets the weighing o f the co in s .∗∗ @param pCoins The abs t r a c t p o s i t i o n s o f the co in s that we propose to measure .∗ @param aCoins The abs t r a c t p o s i t i o n s o f the co in s that we a c tua l l y measure .∗ @return The abs t r a c t b i a s to the s c a l e s .∗∗/

p r i va t e s t a t i c SENSE STATE getMeasurement (ACTION STATE [ ] pCoins , COIN [ ] aCoins ) {/∗ NOTE: Le f t i s negat ive , r i g h t i s p o s i t i v e . ∗/

Page 34

Page 36: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

double b i a s = 0 ;f o r ( i n t x = 0 ; x < pCoins . l ength ; x++){

/∗ Find out the amount o f weight to be added ∗/double coinWeight = 0 ;switch ( aCoins [ x ] ) {

case NORM :coinWeight = 1 . 0 ;break ;

case LITE :coinWeight = 0 . 5 ;break ;

case HEVY :coinWeight = 1 . 5 ;break ;

}/∗ Assign the co in weight in the c o r r e c t p o s i t i o n ∗/switch ( pCoins [ x ] ) {

case LEFT :b i a s −= coinWeight ;break ;

case OFF :/∗ None , not weighed ∗/break ;

case RIGHT :b ia s += coinWeight ;break ;

}}/∗ Figure out what we sensed from the c a l c u l a t ed b ia s ∗/i f ( b i a s < 0) {

r e turn SENSE STATE.LEFT;}i f ( b i a s > 0) {

r e turn SENSE STATE.RIGHT;}r e turn SENSE STATE.MIDDLE;

}

/∗∗∗ logData ( )∗∗ Log the data to the te rmina l f o r l a t e r read ing .∗∗ @param va lue s The va lue s to be d i sp layed .∗∗/

p r i va t e s t a t i c void logData ( double [ ] va lue s ) {/∗ Create a s t r i n g array o f the data we want to p r i n t ∗/St r ing [ ] data = new St r ing [ va lue s . l ength ] ;f o r ( i n t x = 0 ; x < va lue s . l ength ; x++){

data [ x ] = ”” + va lue s [ x ] ;}/∗ Output to the te rmina l ∗/Main . l og ( data ) ;

}

/∗∗∗ getEntropy ( )∗∗ Gets the entropy o f a g iven s e t o f p r o b a b i l i t i e s .∗∗ @param se t The normal i sed s e t o f p r o b a b i l i t i e s to be checked .∗ @return The entropy o f the g iven s e t .∗∗/

p r i va t e s t a t i c double getEntropy ( double [ ] s e t ) {/∗ Sum a l l the entropy p r o b a b i l i t i e s ∗/double entropy = 0 ;f o r ( i n t x = 0 ; x < s e t . l ength ; x++){

/∗ Make sure we ’ re not c a l c u l a t i n g a zero case ∗/

Page 35

Page 37: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

i f ( s e t [ x ] > 0) {/∗ Calcu la te entropy ∗/entropy += se t [ x ] ∗ (Math . l og ( s e t [ x ] ) / Math . l og (2 ) ) ;

}}r e turn −entropy ;

}

/∗∗∗ normal i se ( )∗∗ Normalise a s e t o f data .∗∗ NOTE: This method i s capable o f norma l i s ing a zeroed s e t too .∗∗ @param se t The s e t to be normal i sed .∗ @return A copy o f the normal i sed s e t .∗∗/

p r i va t e s t a t i c double [ ] normal i s e ( double [ ] s e t ) {/∗ Create new s e t ∗/double [ ] nSet = new double [ s e t . l ength ] ;/∗ Count value o f e x i s t i n g data ∗/double c = 0 ;f o r ( i n t x = 0 ; x < s e t . l ength ; x++){

c += se t [ x ] ;}/∗ Check whether C i s ze ro ∗/i f ( c != 0) {

/∗ Calcu la te norma l i s a t i on f a c t o r ∗/double n = 1 / c ;/∗ Normalise the data us ing norma l i s a t i on f a c t o r ∗/f o r ( i n t x = 0 ; x < s e t . l ength ; x++){

nSet [ x ] = s e t [ x ] ∗ n ;}

} e l s e {/∗ Imposs ib l e s ta te , do nothing ∗/

}/∗ Return the normal i sed s e t ∗/re turn nSet ;

}}

Page 36

Page 38: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.1.6 InformationGain.java

package barray . co in ;

import java . lang .Math ;

/∗∗∗ InformationGain . java∗∗ This c l a s s i s r e s p on s i b l e f o r doing a s imple in fo rmat ion gain based search∗ with the opt ion o f search depth l e v e l .∗∗/

pub l i c c l a s s InformationGain {pr i va t e i n t depth ;

/∗∗∗ InformationGain ( )∗∗ The i n i t i a l i s e r method f o r s o l v i n g the problem .∗∗ @param depth The depth o f the t r e e to search .∗∗/

pub l i c InformationGain ( i n t depth ) {i f ( depth < 1) {

Main . e r r o r ( ” Search depth not p o s s i b l e ” ) ;}t h i s . depth = depth ;

}

/∗∗∗ proce s s ( )∗∗ Solve the problem given , b lock un t i l complete .∗∗ @param goa l The s o l u t i o n to the problem .∗∗/

pub l i c void proce s s (COIN [ ] goa l ) {/∗ Bayesian model ∗/double [ ] va lue s = new double [WORLDSTATE. va lue s ( ) . l ength ] ;/∗ Setup Bayesian model ∗/f o r ( i n t x = 0 ; x < WORLDSTATE. va lue s ( ) . l ength ; x++){

/∗ Setup the p r obab i l i t y o f each as equal ∗/va lue s [ x ] = 1 .0 / WORLDSTATE. va lue s ( ) . l ength ;

}/∗ Normalise out Bayesian model ∗/va lue s = normal i se ( va lue s ) ;/∗ Keep sea r ch ing un t i l one conc lu s i on i s found ∗/i n t count = 0 ;f o r ( ; ; ) {

count++;///∗ Log what we cu r r en t l y know ∗/// logData ( va lue s ) ;/∗ Calcu la te cur rent in fo rmat ion ∗/double w = getEntropy ( va lue s ) ;Main . l og (new St r ing [ ] { ”wor ld entropy ” , ”” + w}) ;/∗ I f the r e i s no world entropy , we have so lved the problem ∗/i f (w == 0) {

break ;}/∗ Calcu la te the best ac t i on to be taken at a g iven depth ∗/ACTION STATE [ ] bestCoins = getBestAct ion ( depth , values , w) ;/∗ Action on the s t a t e ∗/SENSE STATE measurement = getMeasurement ( bestCoins , goa l ) ;/∗ Update in fo rmat ion we gained in our world from the r e a l experiment ∗/va lue s = updateBayesian ( values , bestCoins , measurement ) ;

}/∗ Find out which s o l u t i o n we came to ∗/i n t s o l u t i o n = −1;

Page 37

Page 39: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

f o r ( i n t x = 0 ; x < va lue s . l ength ; x++){i f ( va lue s [ x ] == 1) {

s o l u t i o n = x ;}

}/∗ Print the s o l u t i o n ∗/COIN [ ] so lvedCoins = WORLDSTATE. va lue s ( ) [ s o l u t i o n ] . getWorldState ( ) ;f o r ( i n t x = 0 ; x < so lvedCoins . l ength ; x++){

System . out . p r i n t l n ( ” so lvedCoins [ ” + x + ” ] −> ” + so lvedCoins [ x ] . t oS t r i ng ( ) ) ;}/∗ Display the number o f i t e r a t i o n s r equ i r ed ∗/System . out . p r i n t l n ( ”##,” + count ) ;

}

/∗∗∗ getBestAct ion ( )∗∗ Recur s ive ly l ook s f o r the best ac t i on to be taken .∗∗ @param searchDepth The depth o f the r e cu r s i on to search f o r the in fo rmat ion gained .∗ @param worldBayesian The world Bayes model .∗ @param worldEntropy The entropy o f the world .∗ @return The best ac t i on s t a t e that was found .∗∗/

p r i va t e ACTION STATE [ ] getBestAct ion ( i n t searchDepth , double [ ] worldBayesian , doubleworldEntropy ) {

/∗ Best next s t ep s p o s s i b l e ∗/double best In foGain = 0 ;ACTION STATE [ ] bestCoins = nu l l ;/∗ Al l p o s s i b l e ac t i on s t a t e s ∗/i n t wLen = WORLDSTATE. va lue s ( ) [ 0 ] . getWorldState ( ) . l ength ;i n t aLen = ACTION STATE. va lue s ( ) . l ength ;i n t aCombo = ( i n t ) (Math . pow( aLen , wLen) ) ;f o r ( i n t z = 0 ; z < aCombo ; z++){

ACTION STATE [ ] c o in s = new ACTION STATE[wLen ] ;i n t ac t i on = z ;/∗ Figure out where each co in would be in each s t a t e ∗/f o r ( i n t y = 0 ; y < wLen ; y++){

co in s [ y ] = ACTION STATE. va lue s ( ) [ a c t i on % aLen ] ;a c t i on /= aLen ;

}double avgInfo = getAvgInfo ( searchDepth , worldBayesian , c o in s ) ; // NOTE: Temporary ./∗ I f b e t t e r than our cur rent p r ed i c t ed in fo rmat ion gain , s t o r e the s t a t e ∗/i f ( worldEntropy − avgInfo > best In foGain ) {

best In foGain = worldEntropy − avgInfo ;bestCoins = co in s ;

}}r e turn bestCoins ;

}

/∗∗∗ getAvgInfo ( )∗∗ Ca l cu l a t e s the average in fo rmat ion gained from a move by sea r ch ing the∗ t r e e r e c u r s i v e l y to a g iven depth .∗∗ @param currentDepth The cur rent depth o f the r e cu r s i on .∗ @param currentWorldBay The cur rent world Bayesian given the r e c u r s i v e∗ depth .∗ @param co in s The proposed arrangement o f the co in s to be t e s t ed .∗ @return Average in fo rmat ion gained from act i on at a g iven depth .∗∗/

p r i va t e double getAvgInfo ( i n t currentDepth , double [ ] currentWorldBay , ACTION STATE [ ] c o in s) {

/∗ I t e r a t e through d i f f e r e n t s enso r opt ions f o r proposed senso r s t a t e s ∗/double avgInfo = 0 ;i n t avgCnt = 0 ;

Page 38

Page 40: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

f o r (SENSE STATE ss : SENSE STATE. va lue s ( ) ) {/∗ Calcu la te Bayesian model based on new in format ion ∗/double [ ] bay = updateBayesian ( currentWorldBay , co ins , s s ) ;/∗ Check whether the pr ed i c t ed s t a t e i s impos s ib l e ∗/double baySum = 0 ;f o r ( i n t x = 0 ; x < bay . l ength ; x++){

baySum += bay [ x ] ;}i f (baySum > 0) {

i f ( currentDepth > 1) {/∗ Al l p o s s i b l e ac t i on s t a t e s ∗/i n t wLen = WORLDSTATE. va lue s ( ) [ 0 ] . getWorldState ( ) . l ength ;i n t aLen = ACTION STATE. va lue s ( ) . l ength ;i n t aCombo = ( i n t ) (Math . pow( aLen , wLen) ) ;double avgLayerInfo = 0 ;f o r ( i n t z = 0 ; z < aCombo ; z++){

ACTION STATE [ ] nCoins = new ACTION STATE[wLen ] ;i n t ac t i on = z ;/∗ Figure out where each co in would be in each s t a t e ∗/f o r ( i n t y = 0 ; y < wLen ; y++){

nCoins [ y ] = ACTION STATE. va lue s ( ) [ a c t i on % aLen ] ;a c t i on /= aLen ;

}avgInfo += getAvgInfo ( currentDepth − 1 , bay , nCoins ) ;/∗ Add to average in fo rmat ion count ∗/avgCnt++;

}} e l s e {

/∗ Calcu la te the in fo rmat ion ∗/avgInfo += getEntropy ( bay ) ;/∗ Add to average in fo rmat ion count ∗/avgCnt++;

}}

}/∗ Average the in fo rmat ion gained ∗/i f ( avgCnt > 0) {

/∗ Calcu la te the average in fo rmat ion f o r gained in each s t a t e ∗/avgInfo /= avgCnt ;

} e l s e {/∗ TODO: Pos s ib ly t r oub l i ng case where no s t a t e s were p o s s i b l e and we are

f o r c ed to take an average due to r e cu r s i on . ∗/Main . e r r o r ( ”Unhandled entropy case h i t . ” ) ;

}/∗ Return the cur rent average in fo rmat ion as we have reached the end ∗/re turn avgInfo ;

}

/∗∗∗ updateBayesian ( )∗∗ Calcu la te the new va lues o f the Bayesian model based on the cur rent∗ Bayesian model and the g iven new in fo rmat ion .∗∗ @param bay The old Bayesian model .∗ @param pos The po s i t i o n o f the co in s as we prepared them f o r the experiment .∗ @param ss The new sensed s t a t e .∗ @return The new Bayesian model .∗∗/

p r i va t e s t a t i c double [ ] updateBayesian ( double [ ] bay , ACTION STATE [ ] pos , SENSE STATE ss ) {/∗ Make a copy o f prev ious array with new data ∗/double [ ] newBay = new double [ bay . l ength ] ;f o r ( i n t x = 0 ; x < bay . l ength ; x++){

/∗ Store o ld value ∗/newBay [ x ] = bay [ x ] ;/∗ Get the co in s f o r the proposed world s t a t e ∗/COIN [ ] c o i n s = WORLDSTATE. va lue s ( ) [ x ] . getWorldState ( ) ;/∗ Calcu la te the sense s t a t e we would p r ed i c t to s ee ∗/

Page 39

Page 41: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

SENSE STATE pred i c t ed = getMeasurement ( pos , c o i n s ) ;/∗ Check i f that matches what we a c tua l l y saw ∗/i f ( p r ed i c t ed != s s ) {

/∗ Can ’ t be a c o r r e c t hypothes i s − wipe i t ∗/newBay [ x ] = 0 ;

}}r e turn normal i s e (newBay) ;

}

/∗∗∗ getMeasurement ( )∗∗ Gets the weighing o f the co in s .∗∗ @param pCoins The abs t r a c t p o s i t i o n s o f the co in s that we propose to measure .∗ @param aCoins The abs t r a c t p o s i t i o n s o f the co in s that we a c tua l l y measure .∗ @return The abs t r a c t b i a s to the s c a l e s .∗∗/

p r i va t e s t a t i c SENSE STATE getMeasurement (ACTION STATE [ ] pCoins , COIN [ ] aCoins ) {/∗ NOTE: Le f t i s negat ive , r i g h t i s p o s i t i v e . ∗/double b i a s = 0 ;f o r ( i n t x = 0 ; x < pCoins . l ength ; x++){

/∗ Find out the amount o f weight to be added ∗/double coinWeight = 0 ;switch ( aCoins [ x ] ) {

case NORM :coinWeight = 1 . 0 ;break ;

case LITE :coinWeight = 0 . 5 ;break ;

case HEVY :coinWeight = 1 . 5 ;break ;

}/∗ Assign the co in weight in the c o r r e c t p o s i t i o n ∗/switch ( pCoins [ x ] ) {

case LEFT :b i a s −= coinWeight ;break ;

case OFF :/∗ None , not weighed ∗/break ;

case RIGHT :b ia s += coinWeight ;break ;

}}/∗ Figure out what we sensed from the c a l c u l a t ed b ia s ∗/i f ( b i a s < 0) {

r e turn SENSE STATE.LEFT;}i f ( b i a s > 0) {

r e turn SENSE STATE.RIGHT;}r e turn SENSE STATE.MIDDLE;

}

/∗∗∗ logData ( )∗∗ Log the data to the te rmina l f o r l a t e r read ing .∗∗ @param va lue s The va lue s to be d i sp layed .∗∗/

p r i va t e s t a t i c void logData ( double [ ] va lue s ) {/∗ Create a s t r i n g array o f the data we want to p r i n t ∗/

Page 40

Page 42: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

St r ing [ ] data = new St r ing [ va lue s . l ength ] ;f o r ( i n t x = 0 ; x < va lue s . l ength ; x++){

data [ x ] = ”” + va lue s [ x ] ;}/∗ Output to the te rmina l ∗/Main . l og ( data ) ;

}

/∗∗∗ getEntropy ( )∗∗ Gets the entropy o f a g iven s e t o f p r o b a b i l i t i e s .∗∗ @param se t The normal i sed s e t o f p r o b a b i l i t i e s to be checked .∗ @return The entropy o f the g iven s e t .∗∗/

p r i va t e s t a t i c double getEntropy ( double [ ] s e t ) {/∗ Sum a l l the entropy p r o b a b i l i t i e s ∗/double entropy = 0 ;f o r ( i n t x = 0 ; x < s e t . l ength ; x++){

/∗ Make sure we ’ re not c a l c u l a t i n g a zero case ∗/i f ( s e t [ x ] > 0) {

/∗ Calcu la te entropy ∗/entropy += se t [ x ] ∗ (Math . l og ( s e t [ x ] ) / Math . l og (2 ) ) ;

}}r e turn −entropy ;

}

/∗∗∗ normal i se ( )∗∗ Normalise a s e t o f data .∗∗ NOTE: This method i s capable o f norma l i s ing a zeroed s e t too .∗∗ @param se t The s e t to be normal i sed .∗ @return A copy o f the normal i sed s e t .∗∗/

p r i va t e s t a t i c double [ ] normal i s e ( double [ ] s e t ) {/∗ Create new s e t ∗/double [ ] nSet = new double [ s e t . l ength ] ;/∗ Count value o f e x i s t i n g data ∗/double c = 0 ;f o r ( i n t x = 0 ; x < s e t . l ength ; x++){

c += se t [ x ] ;}/∗ Check whether C i s ze ro ∗/i f ( c != 0) {

/∗ Calcu la te norma l i s a t i on f a c t o r ∗/double n = 1 / c ;/∗ Normalise the data us ing norma l i s a t i on f a c t o r ∗/f o r ( i n t x = 0 ; x < s e t . l ength ; x++){

nSet [ x ] = s e t [ x ] ∗ n ;}

} e l s e {/∗ Imposs ib l e s ta te , do nothing ∗/

}/∗ Return the normal i sed s e t ∗/re turn nSet ;

}}

Page 41

Page 43: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.1.7 PROBLEM SOLVER.java

package barray . co in ;

/∗∗∗ PROBLEMSOLVER. java∗∗ The d i f f e r e n t types o f s o l v e r f o r the problem .∗∗/

pub l i c enum PROBLEMSOLVER{RANDOM,INFO GAIN 1 DPTH ,INFO GAIN 2 DPTH ,INFO GAIN 3 DPTH ,INFO GAIN 4 DPTH ,INFO GAIN 5 DPTH ;

}

Page 42

Page 44: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.1.8 ACTION STATE.java

package barray . co in ;

/∗∗∗ ACTION STATE. java∗∗ The s t a t e that can be act ioned on a co in .∗∗/

pub l i c enum ACTION STATE{LEFT,OFF,RIGHT;

}

Page 43

Page 45: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.1.9 SENSE STATE.java

package barray . co in ;

/∗∗∗ SENSE STATE. java∗∗ The sensed s t a t e o f the balance s c a l e .∗∗/

pub l i c enum SENSE STATE{LEFT,MIDDLE,RIGHT;

}

Page 44

Page 46: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.1.10 WORLD STATE.java

package barray . co in ;

/∗∗∗ WORLDSTATE. java∗∗ A c o l l e c t i o n o f s t a t e s the world could po s s i b l y be in when the problem i s∗ complete .∗∗/

pub l i c enum WORLDSTATE{W1(new COIN [ ] {COIN. LITE , COIN.NORM, COIN.NORM, COIN.NORM}) ,W2(new COIN [ ] {COIN.NORM, COIN. LITE , COIN.NORM, COIN.NORM}) ,W3(new COIN [ ] {COIN.NORM, COIN.NORM, COIN. LITE , COIN.NORM}) ,W4(new COIN [ ] {COIN.NORM, COIN.NORM, COIN.NORM, COIN. LITE}) ,W5(new COIN [ ] {COIN.HEVY, COIN.NORM, COIN.NORM, COIN.NORM}) ,W6(new COIN [ ] {COIN.NORM, COIN.HEVY, COIN.NORM, COIN.NORM}) ,W7(new COIN [ ] {COIN.NORM, COIN.NORM, COIN.HEVY, COIN.NORM}) ,W8(new COIN [ ] {COIN.NORM, COIN.NORM, COIN.NORM, COIN.HEVY}) ;

p r i va t e f i n a l COIN [ ] c o i n s ;

/∗∗∗ WORLDSTATE( )∗∗ I n i t i a l i s e the world s t a t e .∗∗/

WORLDSTATE(COIN [ ] c o in s ) {t h i s . c o i n s = co in s ;

}

/∗∗∗ getWorldState ( )∗∗ A goa l s t a t e o f the world .∗∗ @return The goa l s t a t e o f the world .∗∗/

COIN [ ] getWorldState ( ) {r e turn co in s ;

}}

Page 45

Page 47: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.1.11 COIN.java

package barray . co in ;

/∗∗∗ COIN. java∗∗ The property to be a s s o c i a t ed with a co in .∗∗/

pub l i c enum COIN{NORM,LITE ,HEVY;

}

Page 46

Page 48: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.2 Camera Problem Source Code

In this section is the source code for the camera problem. Please contact [email protected] forread access to:

• https://bitbucket.org/danielbarry/final-year-project

[email protected]:danielbarry/final-year-project.git

Page 47

Page 49: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.2.1 run.sh

#!/ bin /bash

func t i on t e s t {cd d i s t

r e s u l t=$ ( java − j a r cam . j a r $1 100 $2 )readarray −t y <<<” $ r e s u l t ”f o r i in ”${y [@]} ”do

echo −e $ i | grep ”##”done

cd . .}

f unc t i on main {f o r x in {0 . . 1000}do

t e s t $1 $2done

}

main $1 $2

Page 48

Page 50: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.2.2 build.xml

<?xml ve r s i on=” 1 .0 ” encoding=”UTF−8”?><p ro j e c t name=” co in ” d e f au l t=” j a r ” ba s ed i r=” . ”>

<d e s c r i p t i o n>An experiment to t e s t f o r fake co in s .</ d e s c r i p t i o n>

<property name=” source . d i r ” l o c a t i o n=” s r c /” /><property name=” bu i ld . d i r ” l o c a t i o n=”bin /” /><property name=” j a r . d i r ” l o c a t i o n=” d i s t /” /><property name=”doc . d i r ” l o c a t i o n=”doc/” /><property name=”main . c l a s s ” value=”barray . cam .Main” /><property name=”main . j a r ” value=”cam . j a r ” />

<t a r g e t name=” c l ean ” d e s c r i p t i o n=”Clean B ina r i e s ”><de l e t e d i r=”${ bu i ld . d i r }” /><de l e t e d i r=”${ j a r . d i r }” />

</ ta r g e t>

<t a r g e t name=”doc” d e s c r i p t i o n=”Create Documentation”><de l e t e d i r=”${doc . d i r }” /><mkdir d i r=”${doc . d i r }” /><javadoc d e s t d i r=”${doc . d i r }”>

< f i l e s e t d i r=”${ source . d i r }” /></ javadoc>

</ ta r g e t>

<t a r g e t name=” compile ” depends=” c l ean ” d e s c r i p t i o n=”Compile Java Code”><mkdir d i r=”${ bu i ld . d i r }” /><javac s r c d i r=”${ source . d i r }” d e s t d i r=”${ bu i ld . d i r }” debug=” true ” inc ludeantrunt ime=”

f a l s e ” /></ ta r g e t>

<t a r g e t name=” j a r ” depends=” compi le ” d e s c r i p t i o n=”Create Jar F i l e ”><mkdir d i r=”${ j a r . d i r }” />< j a r d e s t f i l e=”${ j a r . d i r }/${main . j a r }” bas ed i r=”${ bu i ld . d i r }”>

<mani fe s t><a t t r i b u t e name=”Main−Class ” value=”${main . c l a s s }” />

</mani f e s t></ j a r>

</ ta r g e t>

<t a r g e t name=”run” depends=” j a r ” d e s c r i p t i o n=”Run Java App”><java j a r=”${ j a r . d i r }/${main . j a r }” f o rk=” true ” />

</ ta r g e t></ p r o j e c t>

Page 49

Page 51: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.2.3 Main.java

package barray . cam ;

/∗∗∗ Main . java∗∗ The main entry po int in to the program , handl ing the command l i n e arguments∗ f o r the program . The job o f t h i s c l a s s i s to f i nd out what the user wants∗ and prepare execut ion o f the main program i f r equ i r ed .∗∗/

pub l i c c l a s s Main{pub l i c s t a t i c I n t e r f a c e out ;

/∗∗∗ main ( )∗∗ The main entry po int o f the program , breaking down the command l i n e∗ arguments be f o r e p ro c e s s i ng them in other methods .∗∗ @param args The arguments supp l i ed the main program .∗∗/

pub l i c s t a t i c void main ( S t r ing [ ] a rgs ) {/∗ Set the d e f au l t i n t e r f a c e to the te rmina l ∗//∗ TODO: Switch to GUI f o r demo . ∗/out = new Terminal ( ) ;/∗ Display message about the expected input o f program ∗/Main . out . debug (

”\ncam . j a r <MODE> <LIMIT> <ENVIRONMENT>” +”\n” +”\n MODE” +”\n 0 Random” +”\n >0 In f o Gain Depth” +”\n” +”\n LIMIT” +”\n Number o f s t ep s be f o r e ba i l ou t ” +”\n” +”\n ENVIRONMENT” +”\n 0 Basic ( with l im i t s ) ” +”\n 1 Loop ( p o s s i b i l i t y o f no l im i t s ) ”

) ;/∗ Program s ta r t ed ∗/out . debug ( ”Program s ta r t ed ” ) ;/∗ Construct the environment ∗/i n t l im i t = In t eg e r . pa r s e In t ( args [ 1 ] ) ;Environment env = nu l l ;i f ( I n t eg e r . pa r s e In t ( args [ 2 ] ) == 0) {

env = new BasicEnv (8 , l im i t ) ;} e l s e {

env = new LoopEnv (8 , l im i t ) ;}/∗ Construct the agent ∗/Agent agent = nu l l ;i n t mode = In t eg e r . pa r s e In t ( args [ 0 ] ) ;i f (mode <= 0) {

agent = new RandomAgent ( env , env . getWorldStateCount ( ) ) ;} e l s e {

agent = new BasicAgent ( env , env . getWorldStateCount ( ) , mode) ;}/∗ Add the agent to the environment ∗/env . addAgent ( agent ) ;/∗ Run the experiment ∗/env . run ( ) ;/∗ Program ended ∗/out . debug ( ”Program ended” ) ;

}}

Page 50

Page 52: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.2.4 Environment.java

package barray . cam ;

/∗∗∗ Environment . java∗∗ A standard i n t e r f a c e f o r the environment that the agent has to exp lo r e and∗ l e a rn .∗∗/

pub l i c i n t e r f a c e Environment{/∗∗∗ SENSE STATE∗∗ Al l p o s s i b l e s t a t e s an agent can sense .∗∗/

pub l i c enum SENSE STATE{LEFT,RIGHT,NONE

}

/∗∗∗ ACT STATE∗∗ Al l p o s s i b l e s t a t e s an agent can act .∗∗/

pub l i c enum ACT STATE{LEFT,RIGHT

}

/∗∗∗ addAgent ( )∗∗ Add the agent to the environment .∗∗ @param a The agent to be added to the environment .∗∗/

pub l i c void addAgent (Agent a ) ;

/∗∗∗ run ( )∗∗ The main s imu la t i on loop to be run once the environment and agent have∗ been setup c o r r e c t l y .∗∗/

pub l i c void run ( ) ;

/∗∗∗ agentSense ( )∗∗ Allow the agent to sense the environment .∗∗ @param i The cur rent p o s i t i o n o f the agent .∗ @return Proposed po s i t i o n o f the agent .∗∗/

pub l i c SENSE STATE agentSense ( i n t i ) ;

/∗∗∗ agentAct ( )∗∗ Allows the agent to act in the environment .∗∗ @param i The cur rent p o s i t i o n o f the agent .∗ @param a The cur rent ac t i on s t a t e .∗ @return The ca l c u l a t ed po s i t i o n o f the agent .∗∗/

Page 51

Page 53: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

pub l i c i n t agentAct ( i n t i , ACT STATE a ) ;

/∗∗∗ getWorldStateCount ( )∗∗ Gets the number o f world s t a t e s p o s s i b l e .∗∗ @return The number o f p o s s i b l e world s t a t e s .∗∗/

pub l i c i n t getWorldStateCount ( ) ;

/∗∗∗ getWorldStates ( )∗∗ Gets the world s t a t e s .∗∗ NOTE: These must not be changed .∗∗ @return The world s t a t e s .∗∗/

pub l i c SENSE STATE [ ] [ ] getWorldStates ( ) ;

/∗∗∗ getWorldSize ( )∗∗ Gets the s i z e o f the world .∗∗ @return The s i z e o f the world .∗∗/

pub l i c i n t getWorldSize ( ) ;

/∗∗∗ getAgentPos i t ion ( )∗∗ Gets the cur rent po s i t i o n o f the agent .∗∗/

pub l i c i n t getAgentPos i t ion ( ) ;

/∗∗∗ getLimitA ( )∗∗ Gets the l im i t o f the environment .∗∗/

pub l i c i n t getLimitA ( ) ;

/∗∗∗ getLimitB ( )∗∗ Gets the l im i t o f the environment .∗∗/

pub l i c i n t getLimitB ( ) ;}

Page 52

Page 54: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.2.5 BasicEnv.java

package barray . cam ;

import java . u t i l .Random ;

/∗∗∗ BasicEnv . java∗∗ A simple environment setup to t e s t the ba s i c system .∗∗/

pub l i c c l a s s BasicEnv implements Environment{pr i va t e i n t n ;p r i va t e i n t l ;p r i va t e i n t limA ;p r i va t e i n t limB ;p r i va t e i n t aPos ;p r i va t e s t a t i c SENSE STATE [ ] [ ] wor ldStates ;p r i va t e SENSE STATE [ ] s o l u t i o n ;p r i va t e Agent agent ;

/∗∗∗ BasicEnv ( )∗∗ The bas i c environment i n i t i a l i s a t i o n .∗∗ @param num The number o f p o s s i b l e s t a t e .∗ @param l im i t The l im i t to the number o f l oops t i l l s o l u t i o n i s found .∗∗/

pub l i c BasicEnv ( i n t num, i n t l im i t ) {n = num;l = l im i t ;Random rand = new Random( ) ;aPos = rand . next Int (n) ;/∗ Generate world s t a t e ∗/i n t l = n ∗ (n − 1) ;wor ldStates = new SENSE STATE[ l ] [ ] ;f o r ( i n t y = 0 ; y < n − 1 ; y++){ /∗ Right po s i t i o n ∗/

f o r ( i n t x = 0 ; x < n ; x++){ /∗ Le f t p o s i t i o n ∗/i n t i = (y ∗ n) + x ;wor ldStates [ i ] = new SENSE STATE[ n ] ;/∗ Wipe cur rent sense s t a t e s ∗/f o r ( i n t z = 0 ; z < wor ldStates [ i ] . l ength ; z++){

wor ldStates [ i ] [ z ] = SENSE STATE.NONE;}wor ldStates [ i ] [ x ] = SENSE STATE.LEFT;wor ldStates [ i ] [ y < x ? y : y + 1 ] = SENSE STATE.RIGHT;

}}/∗ Generate s o l u t i o n ∗/s o l u t i o n = wor ldStates [ rand . next Int ( wor ldStates . l ength ) ] ;/∗ Get the l im i t s ∗/f o r ( i n t x = 0 ; x < s o l u t i o n . l ength ; x++){

i f ( s o l u t i o n [ x ] == SENSE STATE.LEFT) {limA = x ;

}i f ( s o l u t i o n [ x ] == SENSE STATE.RIGHT) {

limB = x ;}

}/∗ Debug what has been crea ted ∗/St r ing bu f f = ” So lu t i on : ” ;f o r ( i n t x = 0 ; x < s o l u t i o n . l ength ; x++){

bu f f += ” [ ” + so l u t i o n [ x ] + ” ] , ” ;}Main . out . debug ( bu f f ) ;

}

Page 53

Page 55: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

pub l i c void addAgent (Agent a ) {agent = a ;

}

pub l i c void run ( ) {/∗ Display the cur rent s t a t e o f the agent ∗/Main . out . d i sp layCurrentState ( th i s , agent ) ;/∗ Loop un t i l a s o l u t i o n i s found to the problem ∗/boolean so lved = f a l s e ;i n t l oops = 0 ;whi l e ( ! so lved && loops < l ) {

l oops++;/∗ TODO: Uncomment f o r demo . ∗////∗ Pause here u n t i l use r says to cont inue ∗///Main . out . getKeyPress ( ) ;/∗ Allow the agent to sense ∗/agent . s ense ( agentSense ( aPos ) ) ;/∗ Allow the agent to act ∗/ACT STATE a = agent . act ( ) ;aPos = agentAct ( aPos , a ) ;/∗ Display the cur rent s t a t e o f the agent ∗/Main . out . d i sp layCurrentState ( th i s , agent ) ;/∗ Check whether the problem i s complete ∗/double [ ] tW = agent . getSimpleW () ;i n t oneCnt = 0 ;f o r ( double pos : tW) {

i f ( pos == 1) {oneCnt++;

}}i f ( oneCnt == 2) {

so lved = true ;}

}/∗ Output number o f l oops ∗/Main . out . debug ( ”##,” + loops ) ;

}

pub l i c SENSE STATE agentSense ( i n t i ) {i f ( i == limA) {

r e turn SENSE STATE.LEFT;} e l s e i f ( i == limB ) {

r e turn SENSE STATE.RIGHT;} e l s e {

r e turn SENSE STATE.NONE;}

}

pub l i c i n t agentAct ( i n t i , ACT STATE a ) {i n t tPos = i ;i f ( a == ACT STATE.LEFT) {

i f ( tPos != limA) {−−tPos ;i f ( tPos < 0) {

tPos += n ;}

}} e l s e {

i f ( tPos != limB ) {++tPos ;i f ( tPos >= n) {

tPos −= n ;}

}}r e turn tPos ;

}

Page 54

Page 56: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

pub l i c i n t getWorldStateCount ( ) {r e turn wor ldStates . l ength ;

}

pub l i c SENSE STATE [ ] [ ] getWorldStates ( ) {r e turn wor ldStates ;

}

pub l i c i n t getWorldSize ( ) {r e turn n ;

}

pub l i c i n t getAgentPos i t ion ( ) {r e turn aPos ;

}

pub l i c i n t getLimitA ( ) {r e turn limA ;

}

pub l i c i n t getLimitB ( ) {r e turn limB ;

}}

Page 55

Page 57: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.2.6 LoopEnv.java

package barray . cam ;

import java . u t i l .Random ;

/∗∗∗ LoopEnv . java∗∗ A simple environment setup to t e s t the ba s i c system .∗∗/

pub l i c c l a s s LoopEnv implements Environment{pr i va t e i n t n ;p r i va t e i n t l ;p r i va t e i n t limA ;p r i va t e i n t limB ;p r i va t e i n t aPos ;p r i va t e s t a t i c SENSE STATE [ ] [ ] wor ldStates ;p r i va t e SENSE STATE [ ] s o l u t i o n ;p r i va t e Agent agent ;

/∗∗∗ LoopEnv ( )∗∗ The bas i c environment i n i t i a l i s a t i o n .∗∗ @param num The number o f p o s s i b l e s t a t e .∗ @param l im i t The l im i t to the number o f l oops t i l l s o l u t i o n i s found .∗∗/

pub l i c LoopEnv( i n t num, i n t l im i t ) {n = num;l = l im i t ;Random rand = new Random( ) ;aPos = rand . next Int (n) ;/∗ Generate world s t a t e ∗/i n t l = n ∗ (n − 1) ;/∗ NOTE: Add add i t i o na l space f o r the re being no l im i t s ∗/wor ldStates = new SENSE STATE[ l + 1 ] [ ] ;f o r ( i n t y = 0 ; y < n − 1 ; y++){ /∗ Right po s i t i o n ∗/

f o r ( i n t x = 0 ; x < n ; x++){ /∗ Le f t p o s i t i o n ∗/i n t i = (y ∗ n) + x ;wor ldStates [ i ] = new SENSE STATE[ n ] ;/∗ Wipe cur rent sense s t a t e s ∗/f o r ( i n t z = 0 ; z < wor ldStates [ i ] . l ength ; z++){

wor ldStates [ i ] [ z ] = SENSE STATE.NONE;}wor ldStates [ i ] [ x ] = SENSE STATE.LEFT;wor ldStates [ i ] [ y < x ? y : y + 1 ] = SENSE STATE.RIGHT;

}}/∗ F i l l out the blank s t a t e ∗/wor ldStates [ l ] = new SENSE STATE[ n ] ;f o r ( i n t x = 0 ; x < n ; x++){

wor ldStates [ l ] [ x ] = SENSE STATE.NONE;}/∗ Generate s o l u t i o n ∗/// s o l u t i o n = wor ldStates [ rand . next Int ( wor ldStates . l ength ) ] ;s o l u t i o n = wor ldStates [ wor ldStates . l ength − 1 ] ;/∗ Get the l im i t s i f they e x i s t ∗//∗ NOTE: Set the l im i t s to where the agent cannot e x i s t . ∗/limA = −1;limB = −1;f o r ( i n t x = 0 ; x < s o l u t i o n . l ength ; x++){

i f ( s o l u t i o n [ x ] == SENSE STATE.LEFT) {limA = x ;

}i f ( s o l u t i o n [ x ] == SENSE STATE.RIGHT) {

limB = x ;

Page 56

Page 58: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

}}/∗ Debug what has been crea ted ∗/St r ing bu f f = ” So lu t i on : ” ;f o r ( i n t x = 0 ; x < s o l u t i o n . l ength ; x++){

bu f f += ” [ ” + so l u t i o n [ x ] + ” ] , ” ;}Main . out . debug ( bu f f ) ;

}

pub l i c void addAgent (Agent a ) {agent = a ;

}

pub l i c void run ( ) {/∗ Display the cur rent s t a t e o f the agent ∗/Main . out . d i sp layCurrentState ( th i s , agent ) ;/∗ Loop un t i l a s o l u t i o n i s found to the problem ∗/boolean so lved = f a l s e ;i n t l oops = 0 ;whi l e ( ! so lved && loops < l ) {

l oops++;/∗ TODO: Uncomment f o r demo . ∗////∗ Pause here u n t i l use r says to cont inue ∗///Main . out . getKeyPress ( ) ;/∗ Allow the agent to sense ∗/agent . s ense ( agentSense ( aPos ) ) ;/∗ Allow the agent to act ∗/ACT STATE a = agent . act ( ) ;aPos = agentAct ( aPos , a ) ;/∗ Display the cur rent s t a t e o f the agent ∗/Main . out . d i sp layCurrentState ( th i s , agent ) ;/∗ Check whether the problem i s complete ∗/double [ ] tW = agent . getW() ;f o r ( double pos : tW) {

i f ( pos == 1) {so lved = true ;

}}

}/∗ Output number o f l oops ∗/Main . out . debug ( ”##,” + loops ) ;

}

pub l i c SENSE STATE agentSense ( i n t i ) {i f ( i == limA) {

r e turn SENSE STATE.LEFT;} e l s e i f ( i == limB ) {

r e turn SENSE STATE.RIGHT;} e l s e {

r e turn SENSE STATE.NONE;}

}

pub l i c i n t agentAct ( i n t i , ACT STATE a ) {i n t tPos = i ;i f ( a == ACT STATE.LEFT) {

i f ( tPos != limA) {−−tPos ;i f ( tPos < 0) {

tPos += n ;}

}} e l s e {

i f ( tPos != limB ) {++tPos ;i f ( tPos >= n) {

tPos −= n ;

Page 57

Page 59: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

}}

}r e turn tPos ;

}

pub l i c i n t getWorldStateCount ( ) {r e turn wor ldStates . l ength ;

}

pub l i c SENSE STATE [ ] [ ] getWorldStates ( ) {r e turn wor ldStates ;

}

pub l i c i n t getWorldSize ( ) {r e turn n ;

}

pub l i c i n t getAgentPos i t ion ( ) {r e turn aPos ;

}

pub l i c i n t getLimitA ( ) {r e turn limA ;

}

pub l i c i n t getLimitB ( ) {r e turn limB ;

}}

Page 58

Page 60: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.2.7 Agent.java

package barray . cam ;

/∗∗∗ Agent . java∗∗ A standard i n t e r f a c e f o r an agent s e t to exp lo r e the environment .∗∗/

pub l i c i n t e r f a c e Agent{/∗∗∗ s ense ( )∗∗ Cal led to a l low the agent to sense the cur rent world .∗∗ @param sense The sensed s ta t ed o f the world .∗∗/

pub l i c void sense ( Environment .SENSE STATE sense ) ;

/∗∗∗ act ( )∗∗ Allows the agent to make an ac t i on on i t s e l f in the world .∗∗ @return The ac t i on to be taken on beha l f o f the agent .∗∗/

pub l i c Environment .ACT STATE act ( ) ;

/∗∗∗ getSimpleW ()∗∗ Gets the s imp l i f i e d world s tate , g i v i ng the p r obab i l i t y o f a l im i t∗ e x i s t i n g in a po s i t i o n .∗∗ @return The s imp l i f i e d cur rent world s t a t e .∗∗/

pub l i c double [ ] getSimpleW () ;

/∗∗∗ getW()∗∗ Returns the f u l l uncompressed i n t e r n a l Bayesian model .∗∗ @return The i n t e r n a l Bayesian model .∗∗/

pub l i c double [ ] getW() ;

/∗∗∗ t oS t r i ng ( )∗∗ Converts t h i s c l a s s to a s t r i n g .∗∗ @return A s t r i n g r ep r e s en t a t i on o f t h i s c l a s s .∗∗/

pub l i c S t r ing toS t r i ng ( ) ;}

Page 59

Page 61: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.2.8 BasicAgent.java

package barray . cam ;

/∗∗∗ BasicAgent . java∗∗ A bas i c implementation o f an agent who ’ s job i s to exp lo r e a g iven∗ environment .∗∗/

pub l i c c l a s s BasicAgent implements Agent{pr i va t e Environment e ;p r i va t e i n t n ;p r i va t e double [ ] W;p r i va t e i n t d ;

/∗∗∗ BasicAgent ( )∗∗ The i n i t i a l i s e r f o r a ba s i c agent .∗∗ @param env The environment the agent i s in .∗ @param num The number o f p o s s i b l e s t a t e .∗ @param depth The depth to search the problem .∗∗/

pub l i c BasicAgent ( Environment env , i n t num, i n t depth ) {/∗ I n i t i a l i s e the v a r i a b l e s ∗/e = env ;n = num;d = depth ;W = new double [ n ] ;/∗ Setup and normal i s e the data ∗/f o r ( i n t x = 0 ; x < n ; x++){W[ x ] = 1 ;}W = In f oU t i l . normal i se (W) ;}

pub l i c void sense ( Environment .SENSE STATE sense ) {W = In f oU t i l . naiveBayesUpdate (W, sense , e . getAgentPos i t ion ( ) , e . getWorldStates ( ) ) ;}

pub l i c Environment .ACT STATE act ( ) {Environment .ACT STATE besta = nu l l ;double b e s t I = −1;/∗ I t e r a t e over p o s s i b l e a c t i on s ∗/f o r ( Environment .ACT STATE a : Environment .ACT STATE. va lue s ( ) ) {

/∗ I t e r a t e over p o s s i b l e s en s e s ∗/double avgI = 0 ;double avgC = 0 ;f o r ( Environment .SENSE STATE s : Environment .SENSE STATE. va lue s ( ) ) {

i n t newPos = e . agentAct ( e . getAgentPos i t ion ( ) , a ) ;double [ ] tW = In f oU t i l . naiveBayesUpdate (W, s , newPos , e . getWorldStates ( ) ) ;i f ( I n f oU t i l . sumArray (tW) > 0) {

avgI += ca l cu la t eBes tAvgIn fo (d , tW, newPos ) ;avgC++;

} e l s e {/∗ Do nothing f o r impos s ib l e s c ena r i o ∗/

}}avgI /= avgC ;double avgIGain = In f oU t i l .H(W) − avgI ;/∗ Check to see i f i t beats the cur rent bes t ∗/i f ( avgIGain >= be s t I ) {

be s t I = avgIGain ;besta = a ;

}}

Page 60

Page 62: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

/∗ I f we h i t a NULL case , r ecord i t ∗/i f ( besta == nu l l ) {

Main . out . debug ( ”ERROR: ‘ besta ‘ should not be NULL. ” ) ;}/∗ Se l e c t outcome ∗/re turn besta ;

}

/∗∗∗ ca l cu l a t eAvg In fo ( )∗∗ Ca l cu l a t e s the best average i n f o g iven the in fo rmat ion r e l e van t to i t ’ s∗ search depth .∗∗ @param dpth The cur rent depth o f the search problem .∗ @param w The world model to do the c a l c u l a t i o n s from .∗ @param i The po s i t i o n o f the agent .∗ @return The average in fo rmat ion f o r that problem .∗∗/

p r i va t e double ca l cu la t eBes tAvgIn fo ( i n t dpth , double [ ] w, i n t i ) {/∗ Use the in fo rmat ion found here , or go down another l ay e r i f not at the end ∗/i f ( dpth > 1) {

/∗ I t e r a t e over p o s s i b l e s en s e s ∗/double avgI = 0 ;double avgC = 0 ;/∗ I t e r a t e over p o s s i b l e a c t i on s ∗/f o r ( Environment .ACT STATE a : Environment .ACT STATE. va lue s ( ) ) {

f o r ( Environment .SENSE STATE s : Environment .SENSE STATE. va lue s ( ) ) {i n t newPos = e . agentAct ( i , a ) ;double [ ] tW = In f oU t i l . naiveBayesUpdate (w, s , newPos , e . getWorldStates ( ) ) ;i f ( I n f oU t i l . sumArray (tW) > 0) {

avgI += ca l cu la t eBes tAvgIn fo ( dpth − 1 , tW, newPos ) ;avgC++;

} e l s e {/∗ Do nothing f o r impos s ib l e s c ena r i o ∗/

}}

}/∗ Se l e c t outcome ∗/re turn avgI / avgC ;

} e l s e {r e turn I n f oU t i l .H(w) ;

}}

pub l i c double [ ] getSimpleW () {double [ ] simpleW = new double [ e . getWorldSize ( ) ] ;f o r ( i n t i = 0 ; i < e . getWorldSize ( ) ; i++){ /∗ World p o s i t i o n s ∗/

simpleW [ i ] = 0 ;f o r ( i n t x = 0 ; x < n ; x++){ /∗ World s t a t e s ∗/

i f ( e . getWorldStates ( ) [ x ] [ i ] == Environment .SENSE STATE.LEFT | |e . getWorldStates ( ) [ x ] [ i ] == Environment .SENSE STATE.RIGHT) {

simpleW [ i ] += W[ x ] ;}

}}/∗ NOTE: We know th i s needs norma l i s ing as we are compacting (n∗(n−1) )

s t a t e s i n to n p o s i t i o n s . ∗/simpleW = In f oU t i l . normal i s e ( simpleW) ;/∗ Double each number because we have two l im i t s ∗/f o r ( i n t x = 0 ; x < simpleW . l ength ; x++){

simpleW [ x ] ∗= 2 ;}r e turn simpleW ;

}

pub l i c double [ ] getW() {r e turn W;

Page 61

Page 63: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

}

pub l i c S t r ing toS t r i ng ( ) {St r ing r = ”{” ;f o r ( i n t x = 0 ; x < W. length ; x++){

r += W[ x ] ;i f ( x + 1 < W. length ) {

r += ” , ” ;}

}r e turn r + ”}” ;

}}

Page 62

Page 64: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.2.9 InfoUtil.java

package barray . cam ;

/∗∗∗ I n f oU t i l . java∗∗ In format ion Theory u t i l i t i e s to be used f o r c a l c u l a t i o n s .∗∗/

pub l i c ab s t r a c t c l a s s I n f oU t i l {/∗∗∗ H()∗∗ Gets the entropy o f a g iven s e t o f p r o b a b i l i t i e s .∗∗ @param se t The normal i sed s e t o f p r o b a b i l i t i e s to be checked .∗ @return The entropy o f the g iven s e t .∗∗/

pub l i c s t a t i c double H( double [ ] W) {/∗ Sum a l l the entropy p r o b a b i l i t i e s ∗/double entropy = 0 ;f o r ( i n t x = 0 ; x < W. length ; x++){

double p = W[ x ] ;/∗ Make sure we ’ re not c a l c u l a t i n g a zero case ∗/i f (p > 0) {

/∗ Calcu la te entropy SUM(p∗ l o g 2 (p) ) ∗//∗ NOTE: Ca l cu l a t i on done in base e due to a Java bug . ∗/entropy += p ∗ (Math . l og (p) / Math . l og (2 ) ) ;

}}r e turn −entropy ;

}

/∗∗∗ naiveBayesUpdate ( )∗∗ A naive Bayesian update on the world s t a t e g iven a new p i e c e o f∗ i n fo rmat ion .∗∗ @param w An array o f p r o b a b i l i t i e s f o r the world s t a t e s .∗ @param s The sense s t a t e .∗ @param i The po s i t i o n the update i s to be performed to .∗ @param S Al l p o s s i b l e s t a t e s to be cons ide r ed in the Bayes model .∗ @return The new p r o b a b i l i t i e s f o r world s t a t e s .∗∗/

pub l i c s t a t i c double [ ] naiveBayesUpdate ( double [ ] w, Environment .SENSE STATE s , i n t i ,Environment .SENSE STATE [ ] [ ] S ) {

double [ ] W = c lone (w) ;/∗ The p r o b a b i l i t i e s f o r i t be ing l e f t , r i g h t and none f o r i ∗/double pL = s == Environment .SENSE STATE.LEFT ? 1 : 0 ;double pR = s == Environment .SENSE STATE.RIGHT ? 1 : 0 ;double pN = s == Environment .SENSE STATE.NONE ? 1 : 0 ;/∗ I t e r a t e over the Bayes model and f i nd out how that e f f e c t s i t ∗/f o r ( i n t x = 0 ; x < W. length ; x++){

switch (S [ x ] [ i ] ) {case LEFT :W[ x ] ∗= pL ;break ;

case RIGHT :W[ x ] ∗= pR;break ;

case NONE :W[ x ] ∗= pN;break ;

}}r e turn I n f oU t i l . normal i se (W) ;

}

Page 63

Page 65: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

/∗∗∗ c l one ( )∗∗ Clones an array o f double va lue s .∗∗ @param a The array to be c loned .∗ @return A c lone on the array , a .∗∗/

pub l i c s t a t i c double [ ] c l one ( double [ ] a ) {double [ ] b = new double [ a . l ength ] ;f o r ( i n t x = 0 ; x < a . l ength ; x++){

b [ x ] = a [ x ] ;}r e turn b ;

}

/∗∗∗ normal i se ( )∗∗ Normalise a s e t o f data .∗∗ NOTE: This method i s capable o f norma l i s ing a zeroed s e t too .∗∗ @param se t The s e t to be normal i sed .∗ @return A copy o f the normal i sed s e t .∗∗/

pub l i c s t a t i c double [ ] normal i se ( double [ ] s e t ) {/∗ Create new s e t ∗/double [ ] nSet = new double [ s e t . l ength ] ;/∗ Count value o f e x i s t i n g data ∗/double c = sumArray ( s e t ) ;/∗ Check whether C i s ze ro ∗/i f ( c > 0) {

/∗ Calcu la te norma l i s a t i on f a c t o r ∗/double k = 1 / c ;/∗ Normalise the data us ing norma l i s a t i on f a c t o r ∗/f o r ( i n t x = 0 ; x < s e t . l ength ; x++){

nSet [ x ] = s e t [ x ] ∗ k ;}

} e l s e {/∗ Imposs ib l e s ta te , do nothing ∗/

}/∗ Return the normal i sed s e t ∗/re turn nSet ;

}

/∗∗∗ sumArray ( )∗∗ Sums the array and re tu rn s the r e s u l t .∗∗ @param se t The data s e t to sum .∗ @return The sum of the array .∗∗/

pub l i c s t a t i c double sumArray ( double [ ] s e t ) {double va l = 0 ;f o r ( i n t x = 0 ; x < s e t . l ength ; x++){

va l += se t [ x ] ;}r e turn va l ;

}}

Page 64

Page 66: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.2.10 Interface.java

package barray . cam ;

/∗∗∗ I n t e r f a c e . java∗∗ A standard i n t e r f a c e c l a s s f o r the human i n t e r f a c e , implemented by both the∗ Terminal and GUI c l a s s e s .∗∗/

pub l i c i n t e r f a c e I n t e r f a c e {/∗∗∗ d i sp layCurrentSta te ( )∗∗ Disp lays the world problem given an environment and agent .∗∗ @param env The environment .∗ @param agent The agent .∗∗/

pub l i c void d i sp layCurrentSta te ( Environment env , Agent agent ) ;

/∗∗∗ debug ( )∗∗ Allows a s t r i n g to debugged .∗∗ @param msg The message to be d i sp layed .∗∗/

pub l i c void debug ( St r ing msg) ;

/∗∗∗ getKeyPress ( )∗∗ Get the user to p r e s s any key in order to cont inue .∗∗/

pub l i c void getKeyPress ( ) ;}

Page 65

Page 67: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.2.11 Terminal.java

package barray . cam ;

import java . u t i l . Scanner ;

/∗∗∗ Terminal . java∗∗ A bas i c t ex t r ep r e s en t a t i on o f what i s happening .∗∗/

pub l i c c l a s s Terminal implements I n t e r f a c e {pub l i c void d i sp layCurrentSta te ( Environment env , Agent agent ) {

System . out . p r i n t l n ( agent . t oS t r i ng ( ) ) ;}

pub l i c void debug ( St r ing msg) {System . out . p r i n t l n (msg) ;

}

pub l i c void getKeyPress ( ) {Scanner scan = new Scanner ( System . in ) ;debug ( ”Press ente r to cont inue . ” ) ;scan . nextLine ( ) ;

}}

Page 66

Page 68: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.2.12 GUI.java

package barray . cam ;

import java . awt . Container ;import java . awt . Color ;import java . awt . Graphics ;import javax . swing . JFrame ;

/∗∗∗ GUI . java∗∗ A bas i c g r aph i c a l user i n t e r f a c e implementation c l a s s that r ep r e s en t s the∗ problem .∗∗/

pub l i c c l a s s GUI extends JFrame implements I n t e r f a c e {pr i va t e s t a t i c f i n a l i n t WIN SIZE = 600 ;

p r i va t e Terminal term ;p r i va t e double [ ] [ ] l i n e s ;p r i va t e S t r ing [ ] l a b e l s ;p r i va t e double [ ] aPos ;p r i va t e double [ ] limA ;p r i va t e double [ ] limB ;

/∗∗∗ GUI( )∗∗ Creates a new in s tance o f the GUI c l a s s and i n i t i a l i s e s the window to be∗ used .∗∗/

pub l i c GUI( ) {term = new Terminal ( ) ;l i n e s = new double [ 0 ] [ ] ;l a b e l s = new St r ing [ ] { } ;aPos = new double [ 2 ] ;limA = new double [ 2 ] ;limB = new double [ 2 ] ;s e t S i z e (WIN SIZE , WIN SIZE) ;s e tDe fau l tC lo seOperat i on ( JFrame .EXIT ON CLOSE) ;setContentPane (

new Container ( ) {@Overridepub l i c void pa int ( f i n a l Graphics g ) {

super . pa int ( g ) ;/∗ Calcu la te dimensions ∗/i n t a = getWidth ( ) > getHeight ( ) ? getHeight ( ) : getWidth ( ) ;i n t a l = ( i n t ) ( a / 4) ;i n t ak = ( i n t ) ( a ∗ 0 .625 ) − a l ;i n t ah = ( i n t ) ( a ∗ 0 . 75 ) − a l ;i n t m = a / 2 ;/∗ Draw outer c i r c l e ∗/g . s e tCo lo r ( Color .YELLOW) ;g . f i l l O v a l (0 , 0 , a , a ) ;g . s e tCo lo r ( Color .BLACK) ;g . drawOval (0 , 0 , a , a ) ;/∗ Draw inner c i r c l e ∗/g . s e tCo lo r ( Color .WHITE) ;g . f i l l O v a l ( al , a l , ah , ah ) ;g . s e tCo lo r ( Color .BLACK) ;g . drawOval ( al , a l , ah , ah ) ;/∗ Draw l i n e s ∗/synchron ized ( l i n e s ) {

f o r ( i n t x = 0 ; x < l i n e s . l ength ; x++){g . drawLine (

( i n t ) (m + ( a l ∗ l i n e s [ x ] [ 0 ] ) ) ,( i n t ) (m + ( a l ∗ l i n e s [ x ] [ 1 ] ) ) ,( i n t ) (m + (ah ∗ l i n e s [ x ] [ 2 ] ) ) ,

Page 67

Page 69: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

( i n t ) (m + (ah ∗ l i n e s [ x ] [ 3 ] ) )) ;g . drawString (

l a b e l s [ x ] ,( i n t ) (

m + ( ak ∗ l i n e s [ x ] [ 4 ] ) −/∗ Source : http :// b i t . l y /2bU1Imi ∗/( g . getFontMetr ics ( ) . str ingWidth ( l a b e l s [ x ] ) / 2)

) ,( i n t ) (m + ( ak ∗ l i n e s [ x ] [ 5 ] ) )

) ;}

}g . s e tCo lo r ( Color .RED) ;g . drawLine (

( i n t ) (m) ,( i n t ) (m) ,( i n t ) (m + ( a l ∗ aPos [ 0 ] ) ) ,( i n t ) (m + ( a l ∗ aPos [ 1 ] ) )

) ;i f ( limA != nu l l ) {

g . s e tCo lo r ( Color .BLUE) ;g . drawLine (

( i n t ) (m) ,( i n t ) (m) ,( i n t ) (m + ( a l ∗ limA [ 0 ] ) ) ,( i n t ) (m + ( a l ∗ limA [ 1 ] ) )

) ;}i f ( limB != nu l l ) {

g . s e tCo lo r ( Color .GREEN) ;g . drawLine (

( i n t ) (m) ,( i n t ) (m) ,( i n t ) (m + ( a l ∗ limB [ 0 ] ) ) ,( i n t ) (m + ( a l ∗ limB [ 1 ] ) )

) ;}

}}

) ;s e tV i s i b l e ( t rue ) ;

}

pub l i c void d i sp layCurrentSta te ( Environment env , Agent agent ) {double [ ] w = agent . getSimpleW () ;double arc = (Math . PI ∗ 2) / w. l ength ;synchron ized ( l i n e s ) {

l i n e s = new double [w. l ength ] [ ] ;l a b e l s = new St r ing [w. l ength ] ;f o r ( i n t x = 0 ; x < w. l ength ; x++){

/∗ NOTE: The l a s t two po in t s are f o r t ex t p o s i t i o n . ∗/l i n e s [ x ] = new double [ 6 ] ;l i n e s [ x ] [ 0 ] = Math . s i n ( arc ∗ x ) ;l i n e s [ x ] [ 1 ] = −Math . cos ( arc ∗ x ) ;l i n e s [ x ] [ 2 ] = Math . s i n ( arc ∗ x ) ;l i n e s [ x ] [ 3 ] = −Math . cos ( arc ∗ x ) ;l i n e s [ x ] [ 4 ] = Math . s i n ( arc ∗ ( x + 0 . 5 ) ) ;l i n e s [ x ] [ 5 ] = −Math . cos ( arc ∗ ( x + 0 . 5 ) ) ;/∗ Make l a b e l ∗/l a b e l s [ x ] = ”” + w[ x ] ;

}}/∗ Calcu la te the cur rent po s i t i o n o f the agent to draw ∗/aPos [ 0 ] = Math . s i n ( arc ∗ ( env . getAgentPos i t ion ( ) + 0 . 5 ) ) ;aPos [ 1 ] = −Math . cos ( arc ∗ ( env . getAgentPos i t ion ( ) + 0 . 5 ) ) ;/∗ Calcu la te the l im i t s o f the environment i f p o s s i b l e ∗/i n t lA = env . getLimitA ( ) ;

Page 68

Page 70: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

i n t lB = env . getLimitB ( ) ;i f ( lA >= 0) {

limA [ 0 ] = Math . s i n ( arc ∗ ( lA + 0 .25 ) ) ;limA [ 1 ] = −Math . cos ( arc ∗ ( lA + 0 .25 ) ) ;

} e l s e {limA = nu l l ;

}i f ( lB >= 0) {

limB [ 0 ] = Math . s i n ( arc ∗ ( lB + 0 . 75 ) ) ;limB [ 1 ] = −Math . cos ( arc ∗ ( lB + 0 . 75 ) ) ;

} e l s e {limB = nu l l ;

}/∗ Make sure our update i s draw ∗/r epa in t ( ) ;

}

pub l i c void debug ( St r ing msg) {term . debug (msg) ;

}

pub l i c void getKeyPress ( ) {term . getKeyPress ( ) ;

}}

Page 69

Page 71: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.3 Coin Problem Raw Results

Random F i r s t Second Third3 3 3 33 3 3 33 3 3 33 3 3 33 3 3 33 3 3 33 3 3 33 3 3 33 3 3 33 3 3 33 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 34 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 3

Page 70

Page 72: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

5 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 35 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 36 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 3

Page 71

Page 73: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

7 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 37 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 3

Page 72

Page 74: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

8 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 38 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 3

Page 73

Page 75: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

9 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 39 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 310 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 3

Page 74

Page 76: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

11 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 311 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 3

Page 75

Page 77: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

12 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 312 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 3

Page 76

Page 78: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

13 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 313 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 3

Page 77

Page 79: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

14 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 314 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 315 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 3

Page 78

Page 80: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

16 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 316 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 317 3 3 318 3 3 318 3 3 318 3 3 3

Page 79

Page 81: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

18 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 318 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 319 3 3 419 3 3 4

Page 80

Page 82: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

19 3 3 420 3 3 420 3 3 420 3 3 420 3 3 420 3 3 420 3 3 420 3 3 420 3 3 420 3 3 420 3 4 420 3 4 420 3 4 420 4 4 420 4 4 420 4 4 420 4 4 420 4 4 420 4 4 420 4 4 420 4 4 420 4 4 420 4 4 420 4 4 420 4 4 420 4 4 420 4 4 420 4 4 420 4 4 420 4 4 420 4 4 420 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 421 4 4 422 4 4 422 4 4 422 4 4 422 4 4 422 4 4 422 4 4 422 4 4 422 4 4 422 4 4 422 4 4 422 4 4 4

Page 81

Page 83: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

22 4 4 422 4 4 422 4 4 422 4 4 422 4 4 422 4 4 422 4 4 422 4 4 422 4 4 422 4 4 423 4 4 423 4 4 423 4 4 423 4 4 423 4 4 423 4 4 423 4 4 423 4 4 423 4 4 423 4 4 423 4 4 423 4 4 423 4 4 423 4 4 423 4 4 423 4 4 423 4 4 423 4 4 423 4 4 423 4 4 423 4 4 424 4 4 424 4 4 424 4 4 424 4 4 424 4 4 424 4 4 424 4 4 424 4 4 424 4 4 424 4 4 424 4 4 424 4 4 424 4 4 424 4 4 424 4 4 424 4 4 424 4 4 424 4 4 424 4 4 424 4 4 424 4 4 424 4 4 425 4 4 425 4 4 425 4 4 425 4 4 425 4 4 425 4 4 425 4 4 425 4 4 425 4 4 425 4 4 425 4 4 426 4 4 426 4 4 426 4 4 426 4 4 4

Page 82

Page 84: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

26 4 4 426 4 4 426 4 4 426 4 4 426 4 4 426 4 4 426 4 4 426 4 4 426 4 4 426 4 4 426 4 4 426 4 4 426 4 4 426 4 4 426 4 4 427 4 4 427 4 4 427 4 4 427 4 4 427 4 4 427 4 4 427 4 4 427 4 4 428 4 4 428 4 4 428 4 4 428 4 4 428 4 4 428 4 4 428 4 4 428 4 4 428 4 4 428 4 4 428 4 4 428 4 4 429 4 4 429 4 4 429 4 4 429 4 4 429 4 4 429 4 4 429 4 4 429 4 4 429 4 4 429 4 4 429 4 4 430 4 4 430 4 4 430 4 4 430 4 4 430 4 4 430 4 4 430 4 4 430 4 4 430 4 4 430 4 4 430 4 4 431 4 4 431 4 4 431 4 4 431 4 4 431 4 4 431 4 4 431 4 4 431 4 4 432 4 4 432 4 4 432 4 4 4

Page 83

Page 85: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

32 4 4 432 4 4 432 4 4 432 4 4 432 4 4 432 4 4 432 4 4 432 4 4 433 4 4 433 4 4 433 4 4 433 4 4 434 4 4 434 4 4 434 4 4 434 4 4 434 4 4 434 4 4 434 4 4 435 4 4 435 4 4 435 4 4 435 4 4 435 4 4 435 4 4 435 4 4 436 4 4 436 4 4 436 4 4 436 4 4 437 4 4 437 4 4 438 4 4 439 4 4 439 4 4 439 4 4 440 4 4 440 4 4 440 4 4 441 4 4 441 4 4 443 4 4 444 4 4 444 4 4 446 4 4 446 4 4 449 4 4 450 4 4 450 4 4 452 4 4 453 4 4 458 4 4 4

Page 84

Page 86: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.4 Camera Problem Raw Results

Random 1 Layer 2 Layer 3 Layer 4 Layer 5 Layer 6 Layer 7 Layer 8 Layer38 5 5 10 100 12 7 12 791 3 100 6 4 2 2 3 617 7 100 2 6 6 10 6 756 6 100 7 6 7 8 7 739 4 100 2 7 5 7 6 109 6 7 5 7 7 3 6 1010 4 8 6 6 12 12 12 98 6 5 4 100 11 7 7 1268 6 5 6 7 7 5 10 1123 7 100 100 7 7 11 11 638 7 100 10 6 12 12 11 742 7 3 6 5 5 12 7 716 100 3 7 9 7 12 7 633 100 100 100 4 7 10 6 724 100 6 7 6 10 5 7 511 100 100 4 7 7 12 11 746 6 7 100 7 2 8 6 417 100 3 6 5 4 8 6 714 5 6 5 7 11 7 7 64 5 6 100 9 6 6 7 643 100 2 100 6 7 7 7 78 100 5 7 6 11 3 12 228 7 6 7 7 5 9 7 752 3 5 7 9 6 4 7 39 6 10 7 8 4 6 7 711 100 12 100 10 6 5 10 727 7 7 6 100 7 10 6 722 7 3 6 100 7 12 6 73 6 7 7 4 3 7 12 28 100 100 100 11 6 6 7 1010 100 7 12 3 2 6 7 558 5 5 6 7 8 4 3 725 100 6 100 6 4 11 6 715 7 100 6 9 6 12 8 127 3 4 6 7 5 10 6 713 4 2 3 7 6 5 7 718 7 100 5 5 6 7 7 719 3 100 7 9 12 3 12 78 4 2 100 7 6 6 7 733 3 100 7 7 7 7 6 623 6 3 100 6 7 6 8 323 7 100 100 100 5 6 10 1112 7 100 7 7 2 7 11 128 4 5 12 7 6 12 7 79 100 6 7 5 7 10 2 523 6 7 6 6 5 6 6 720 100 100 100 6 11 6 7 533 6 7 6 6 2 7 8 710 100 6 6 6 3 6 11 28 2 2 7 7 6 11 12 1167 100 5 100 6 6 6 7 1211 6 5 2 6 12 9 7 316 7 6 100 8 11 2 4 1213 7 6 7 7 10 12 7 255 100 100 6 9 4 7 6 95 100 7 6 2 6 4 12 911 6 4 12 5 12 7 12 725 100 6 6 2 3 5 7 614 7 100 12 7 6 12 12 77 100 7 5 11 11 5 7 921 2 7 5 6 6 11 2 710 100 6 9 100 7 6 6 103 4 100 7 6 7 12 7 928 100 5 2 6 12 7 6 875 100 100 7 6 11 6 11 9

Page 85

Page 87: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

15 7 6 8 3 8 6 12 727 7 100 5 5 100 7 6 1283 6 100 7 8 100 12 7 716 3 5 11 2 7 12 6 78 100 3 3 7 5 7 7 127 7 2 6 4 4 8 3 910 7 6 100 100 6 7 7 56 100 100 6 6 6 12 10 56 100 100 5 6 10 7 11 1229 100 6 4 6 5 5 11 915 100 3 5 6 7 6 7 624 100 5 5 11 8 6 5 620 3 6 5 6 7 7 12 69 3 100 5 8 6 12 6 522 2 4 100 4 11 6 7 716 7 100 6 7 11 6 7 723 100 100 6 6 7 7 7 125 6 7 3 4 6 7 7 767 6 5 100 3 6 7 6 513 6 7 4 11 3 6 7 64 100 100 6 7 7 7 11 66 7 100 7 8 6 12 12 736 7 6 100 7 7 12 7 236 5 7 7 7 12 7 7 716 6 100 7 5 6 7 3 59 7 6 5 6 3 2 12 1013 100 6 6 3 7 7 6 1031 6 7 8 8 4 6 7 622 100 7 100 10 8 9 7 97 100 7 7 9 4 7 7 731 100 100 100 5 5 11 7 1019 7 6 4 3 7 6 7 98 100 2 6 2 11 7 2 526 7 6 6 100 4 4 2 815 4 100 7 3 6 5 8 611 7 4 100 6 6 6 11 218 7 100 7 6 11 11 4 65 100 100 7 5 7 6 5 732 3 100 6 3 2 12 7 335 5 6 5 4 12 7 11 1250 100 6 6 11 11 7 2 610 6 5 6 6 12 9 12 627 6 3 7 6 10 5 7 69 7 7 6 6 7 6 4 718 2 6 2 7 7 7 7 720 100 6 7 5 5 8 12 726 100 5 7 4 7 5 4 725 6 5 7 6 6 11 8 67 5 5 6 11 7 11 6 712 4 5 5 6 12 6 8 716 100 5 7 4 6 6 11 552 5 4 7 5 8 11 6 710 100 7 100 4 6 11 7 1228 7 4 7 7 7 7 12 749 100 5 11 6 6 7 11 711 7 100 7 3 11 6 7 7100 6 100 100 12 12 7 7 636 6 4 5 5 12 11 11 673 4 100 4 7 7 6 7 74 2 12 6 6 7 6 12 642 100 100 100 9 4 8 6 477 7 5 6 6 11 12 12 713 100 6 6 7 7 7 6 631 100 6 7 8 7 2 7 716 2 6 5 6 7 6 4 712 7 5 4 6 3 7 12 1217 100 5 5 6 7 7 7 7100 6 7 100 2 6 6 6 6

Page 86

Page 88: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

25 7 100 7 100 6 6 7 720 6 6 6 10 6 7 7 734 100 100 7 7 6 12 11 7100 100 7 100 3 6 2 6 758 100 100 12 6 7 4 6 99 100 5 7 12 100 7 6 1124 100 7 6 5 5 6 6 1243 6 6 7 5 7 12 7 1142 100 4 6 100 7 4 6 715 7 2 7 8 3 12 6 718 7 5 5 7 11 7 12 312 7 6 100 11 7 6 10 523 5 100 6 7 8 7 4 565 100 100 6 6 2 7 7 67 7 4 4 6 10 12 7 919 7 100 7 7 12 7 7 77 6 8 7 6 10 10 6 781 6 3 7 2 7 6 12 77 6 100 7 12 5 7 6 45 7 100 7 7 9 11 6 64 5 6 4 6 5 6 2 64 2 6 6 7 7 11 7 411 100 6 7 4 5 2 7 97 100 6 100 7 11 7 11 734 7 5 3 6 7 11 8 733 100 100 6 7 2 7 6 714 7 7 5 6 6 7 11 521 4 100 7 6 6 6 7 414 100 100 100 6 6 6 11 56 7 7 6 4 6 7 7 77 100 7 6 9 7 5 11 717 4 7 5 4 4 11 7 643 7 3 6 9 5 7 12 626 4 100 5 5 6 11 6 792 100 100 6 9 11 9 3 76 7 7 7 12 7 12 6 1217 100 6 9 6 7 6 7 517 100 100 6 5 4 6 6 75 7 100 7 7 10 6 7 67 6 7 100 7 10 6 7 418 2 6 12 5 7 6 7 118 7 6 6 7 6 9 7 1278 6 100 7 100 5 7 7 316 3 6 3 7 7 12 11 719 4 7 11 4 6 7 7 710 7 7 7 6 8 12 6 1276 6 100 5 8 12 7 6 628 5 100 7 5 7 5 11 917 100 6 12 7 6 2 11 635 100 7 7 7 6 5 8 718 6 12 100 10 7 7 12 421 7 10 7 11 3 7 7 1213 5 2 6 5 2 7 7 1121 6 6 7 7 3 7 7 714 7 100 4 2 7 12 6 226 3 100 4 7 12 6 6 534 6 8 5 6 6 2 7 1213 100 100 7 100 7 6 7 519 2 6 7 12 7 8 7 614 3 5 100 6 7 12 11 528 6 2 100 7 11 12 7 619 6 100 7 7 8 11 10 720 6 100 4 12 6 12 5 717 7 7 6 7 2 7 11 517 7 4 4 6 7 7 6 614 7 6 4 3 6 4 7 74 7 7 7 7 7 7 7 610 100 100 7 7 7 6 12 7

Page 87

Page 89: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

11 100 7 6 4 6 7 7 76 100 5 6 5 100 6 7 621 5 7 100 4 9 6 7 63 5 6 3 6 7 3 12 1231 4 4 6 5 7 5 7 744 7 100 6 6 6 6 7 918 7 7 12 6 7 2 10 228 5 4 5 5 7 7 2 833 7 6 10 5 6 7 2 76 7 7 100 6 8 7 6 721 7 7 100 6 12 6 6 125 5 7 100 7 7 7 11 818 3 100 4 8 2 6 7 726 7 7 100 3 11 6 7 738 100 100 5 100 4 11 2 6100 6 7 12 7 9 6 7 1225 4 100 2 6 11 7 7 77 100 6 100 6 8 7 8 713 7 6 7 6 7 12 12 748 7 6 100 6 4 11 11 125 100 4 100 9 6 7 6 1215 100 7 8 7 4 9 7 1214 100 4 4 7 7 7 6 612 7 7 100 6 9 10 5 411 5 3 100 2 5 12 8 1218 100 4 4 7 6 3 10 941 2 6 9 9 6 6 2 1284 7 100 9 11 100 11 7 210 5 7 7 12 6 10 4 232 2 6 6 6 3 8 7 69 100 6 4 4 2 7 6 1243 5 7 100 6 2 10 6 64 6 7 5 4 8 12 6 616 100 100 9 6 6 7 12 102 7 6 4 11 7 7 7 716 2 6 6 6 12 12 6 1214 7 4 7 7 11 6 12 716 6 10 100 5 11 11 6 652 6 6 6 8 11 11 6 28 4 3 7 8 7 7 6 79 100 3 5 7 100 6 6 217 4 10 6 6 2 5 7 743 3 8 6 10 6 7 7 64 7 6 5 5 11 2 6 710 6 5 3 11 7 6 3 212 100 100 7 8 7 6 6 719 100 100 7 100 12 6 4 633 7 6 8 6 12 9 5 114 100 4 6 6 6 5 6 118 100 5 7 100 12 7 10 421 100 100 7 6 5 3 7 730 7 7 7 4 7 12 11 1011 7 100 12 9 7 7 7 312 7 100 6 8 7 7 12 78 7 7 100 5 7 7 7 728 7 100 4 5 100 5 7 123 100 6 9 11 8 6 6 1019 7 3 100 7 12 7 7 77 7 5 7 5 5 9 8 76 100 3 3 12 7 10 12 682 7 2 100 6 6 7 10 714 100 6 7 100 4 7 7 619 4 6 100 7 7 12 7 74 7 100 7 8 7 3 4 68 100 6 7 5 12 7 7 79 100 6 6 100 4 9 11 713 6 7 2 7 100 7 11 731 100 3 11 9 6 6 12 12

Page 88

Page 90: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

16 3 7 11 6 3 10 8 621 100 100 7 6 100 10 7 558 5 6 4 7 7 10 6 113 7 3 8 5 4 11 7 56 6 6 6 6 6 7 6 712 7 100 7 5 9 6 7 736 7 4 7 7 7 2 9 88 3 5 7 8 11 7 12 98 5 4 2 11 2 7 7 712 100 7 100 7 100 8 12 1025 100 7 6 6 6 6 6 73 5 5 5 5 7 6 7 516 100 2 6 100 7 11 10 719 7 100 7 2 8 7 6 128 100 100 5 6 6 7 12 221 6 3 9 9 5 7 7 729 6 6 4 6 6 7 3 717 100 4 7 10 7 7 6 618 6 7 4 100 7 6 7 1235 100 100 100 100 6 7 7 126 6 7 7 7 6 6 7 320 100 5 9 8 7 7 8 1224 100 100 9 7 6 3 7 610 100 7 100 4 4 11 11 52 2 6 100 100 4 6 11 626 6 7 7 7 12 6 7 733 6 100 6 6 7 12 7 1219 6 7 100 9 7 12 7 75 100 6 5 7 5 7 7 711 100 100 100 3 100 4 4 821 6 5 7 100 7 9 11 929 6 7 100 6 12 7 12 626 7 100 12 4 12 6 7 528 100 6 100 3 11 7 10 5100 5 6 100 7 3 12 12 727 7 8 4 6 9 7 6 55 7 5 8 6 7 6 6 723 7 100 5 7 11 7 11 711 100 3 4 7 12 6 11 610 6 8 5 6 10 8 4 612 100 7 12 12 7 7 3 741 100 100 4 4 7 7 3 714 6 100 6 6 100 6 7 951 100 100 6 10 12 11 7 711 4 5 100 7 4 6 4 611 7 7 6 5 7 12 12 514 100 4 7 7 7 6 6 64 5 7 7 5 7 7 7 1212 6 7 5 6 6 3 7 7100 7 7 5 9 6 6 5 726 100 5 11 7 7 6 7 610 5 4 7 5 7 4 7 783 100 6 6 3 6 6 6 74 7 100 7 100 5 6 6 660 100 100 5 11 7 12 7 335 7 100 6 7 7 7 12 614 4 4 100 9 6 7 12 922 100 3 6 9 6 6 6 1236 7 7 100 100 7 11 7 619 6 5 7 6 6 11 12 56 100 2 7 3 7 7 5 532 100 6 6 100 3 7 7 66 7 3 7 6 6 4 7 632 7 7 7 100 4 7 7 1010 100 6 4 7 7 7 5 78 100 6 3 6 10 6 7 419 7 100 8 10 6 6 12 1218 5 100 100 6 7 6 7 7

Page 89

Page 91: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

27 3 5 3 10 7 4 6 730 100 6 7 6 11 8 8 1225 6 7 6 6 6 7 7 611 100 5 4 8 11 7 7 596 7 100 7 2 4 6 7 69 100 100 4 100 7 6 9 715 7 6 100 4 2 4 7 754 3 12 7 6 7 7 7 726 4 4 100 6 12 7 7 1048 100 4 100 4 4 6 7 723 7 7 5 6 6 7 8 319 7 100 5 10 7 6 7 715 100 100 11 9 7 7 8 721 6 5 100 9 7 11 5 913 4 5 7 100 7 11 6 37 7 5 6 6 6 7 6 751 100 4 6 2 6 9 12 523 7 5 7 5 6 6 6 710 7 7 4 7 100 7 6 646 100 7 3 7 6 10 12 414 100 100 4 7 8 7 6 75 100 6 6 100 6 7 5 1234 100 3 7 6 6 7 6 717 100 5 9 3 11 7 6 749 3 100 7 5 6 7 6 710 2 5 6 100 100 6 12 729 100 6 6 8 7 6 12 995 7 4 100 8 12 6 12 613 7 7 4 7 5 5 4 615 2 2 3 2 8 4 6 1250 5 7 10 6 12 8 7 73 6 6 100 100 7 6 3 722 7 5 3 7 5 7 12 1222 100 8 6 6 11 6 3 684 7 100 6 6 7 4 6 1016 4 6 6 5 7 8 6 615 7 100 6 100 11 7 7 717 5 7 7 5 7 6 8 624 100 12 10 9 6 6 9 73 100 100 12 6 5 8 7 93 7 3 7 7 7 7 7 67 100 7 7 7 7 12 12 927 100 6 5 6 12 6 7 712 4 7 100 11 11 12 7 92 6 4 100 7 4 12 10 854 3 4 6 7 12 10 6 77 100 4 7 2 7 12 6 79 100 5 100 10 6 6 6 622 100 7 4 7 11 7 6 846 7 6 4 7 8 4 8 75 100 100 6 7 4 7 7 582 7 7 7 10 12 7 12 610 7 7 8 100 12 7 3 719 7 100 6 6 6 7 12 511 100 100 5 10 7 7 2 1011 3 7 7 12 7 7 6 725 7 4 6 100 4 7 6 510 7 6 7 7 4 10 6 626 7 4 100 6 7 6 11 717 6 7 6 9 8 7 3 659 7 100 7 7 6 7 6 77 7 7 7 7 6 7 8 58 2 3 7 7 7 12 7 72 5 6 10 8 5 7 6 924 100 100 7 3 6 6 7 618 100 7 6 5 7 5 6 618 2 7 6 5 10 7 12 716 100 3 6 7 6 8 5 7

Page 90

Page 92: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

39 7 7 100 5 7 7 12 730 6 100 5 6 11 12 11 719 4 100 5 12 5 11 4 733 7 12 7 5 6 7 7 1235 6 6 4 6 7 7 6 79 7 7 12 9 7 7 6 1213 4 3 4 7 10 7 12 1213 6 6 7 5 6 10 6 103 7 7 2 7 6 2 8 510 5 4 7 5 7 4 7 114 7 100 5 5 7 11 7 76 100 6 6 6 7 7 12 713 3 7 100 6 6 2 12 78 100 6 8 7 7 8 7 739 3 7 100 5 100 7 7 6100 100 6 100 6 5 4 7 818 100 2 6 9 7 7 10 812 3 5 6 5 7 6 7 512 100 5 7 11 7 11 7 75 7 3 7 100 7 5 6 4100 100 7 4 11 11 7 12 65 4 4 5 7 7 12 9 938 3 7 100 10 6 12 7 1210 100 5 9 4 4 4 6 1226 100 100 5 100 10 6 7 8100 7 100 10 7 6 11 10 730 100 100 100 5 7 12 10 712 7 5 2 9 12 6 12 617 100 6 12 6 12 11 12 410 100 7 7 6 2 8 12 730 100 100 4 6 7 7 8 721 100 4 100 6 3 7 8 717 7 4 5 100 11 12 12 713 7 7 6 6 7 2 12 727 5 100 7 7 5 12 6 611 100 3 6 6 9 6 5 48 7 6 6 11 11 7 8 1211 7 5 5 7 11 2 11 66 100 7 6 6 7 6 7 717 7 4 7 2 11 7 6 128 100 4 4 5 7 6 6 771 6 7 100 8 6 2 6 913 7 100 7 4 6 6 12 740 100 5 3 6 6 6 6 776 100 2 100 6 5 7 8 628 7 5 6 7 10 6 6 830 4 100 100 7 6 12 12 714 7 100 100 6 6 2 7 723 4 7 100 7 7 6 12 743 100 4 7 6 6 7 7 526 6 4 7 100 6 4 4 527 100 6 6 7 6 3 7 710 4 100 6 7 6 7 7 721 7 12 7 9 7 12 6 930 7 100 100 8 6 7 7 715 100 6 5 7 7 8 7 720 3 5 6 7 7 6 5 810 6 100 7 8 8 7 6 104 100 4 7 7 6 7 2 78 4 7 6 3 6 6 6 1214 7 100 7 100 8 7 6 118 100 3 5 4 11 7 7 128 100 100 4 6 11 7 4 519 5 5 100 3 7 7 7 67 6 7 100 8 8 6 7 625 4 7 9 7 12 6 8 1216 100 7 6 6 6 12 6 1020 100 100 7 5 7 3 7 6

Page 91

Page 93: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

37 5 4 4 8 7 7 8 613 7 2 12 6 7 10 12 1013 5 7 7 6 10 12 7 218 3 10 6 8 6 2 7 724 3 3 7 4 7 7 6 123 6 6 2 7 11 7 7 711 3 3 12 6 4 5 6 78 100 3 7 5 12 2 7 436 100 100 6 6 6 7 8 1193 100 6 6 4 7 12 11 75 5 2 7 12 7 6 6 713 100 7 11 5 10 8 6 714 100 100 4 9 4 5 12 911 100 7 6 6 7 3 7 622 100 6 100 6 5 4 7 1010 7 100 7 6 3 7 7 43 6 4 6 12 100 7 12 1111 3 7 4 7 11 5 4 516 3 2 100 100 10 6 7 1220 2 6 7 7 2 12 7 38 100 2 100 100 7 7 7 79 100 7 6 6 100 8 4 825 5 100 7 10 2 7 7 730 100 8 7 4 5 7 7 1216 100 4 10 100 7 6 7 511 100 4 100 7 6 7 7 1212 100 6 100 9 8 3 11 7100 4 100 7 7 9 12 10 103 6 100 2 100 3 6 12 1018 4 4 6 6 7 12 7 717 5 7 7 6 5 7 5 756 7 4 7 6 4 5 7 735 7 3 6 7 7 11 7 1255 100 2 100 6 6 12 7 736 100 7 6 4 5 7 8 617 3 100 100 7 6 7 6 129 3 4 3 6 7 7 12 913 100 6 7 100 2 7 12 1219 100 2 6 9 7 12 7 724 4 4 7 10 12 11 6 543 5 100 7 5 7 7 6 127 100 7 7 4 6 6 11 68 7 10 7 4 7 3 4 619 2 4 7 100 7 10 8 1114 6 12 6 4 6 12 11 714 7 3 12 10 7 6 2 812 100 4 4 6 4 6 6 126 100 6 100 100 6 10 11 12100 100 5 3 12 7 11 7 613 100 100 7 6 8 3 7 626 6 100 4 7 12 11 4 758 7 7 6 11 12 7 12 1111 7 7 9 4 7 10 12 67 2 100 8 100 7 11 8 322 7 2 5 7 6 5 6 76 4 100 6 6 5 12 6 59 100 100 4 7 6 7 2 720 7 100 7 11 7 6 7 1215 5 100 7 7 7 8 6 844 7 6 6 6 7 7 7 721 100 7 6 7 7 5 11 1231 100 5 100 6 7 2 7 864 3 6 100 100 6 7 10 711 100 7 7 100 100 6 7 68 100 4 6 4 6 6 7 610 4 3 100 7 7 6 6 517 7 10 4 5 8 9 7 717 7 7 7 6 100 6 6 7

Page 92

Page 94: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

7 4 3 3 6 100 7 11 617 4 6 7 4 7 2 8 9100 5 4 4 7 12 5 12 720 6 2 12 8 12 6 11 99 6 100 3 7 5 6 5 428 6 7 6 5 9 7 2 72 100 4 6 7 12 7 5 34 7 6 7 6 11 12 7 78 4 6 4 5 11 11 7 643 100 5 6 5 2 6 7 724 3 100 11 6 11 12 7 734 5 100 6 4 100 12 11 77 7 7 11 11 4 12 7 102 7 7 2 5 2 6 7 728 5 12 7 100 8 12 7 664 6 3 7 6 4 6 6 555 4 6 2 11 7 11 11 35 100 6 7 7 6 11 9 749 2 7 2 6 4 12 6 716 6 100 9 7 8 7 11 79 100 100 10 6 7 4 8 437 6 100 6 6 4 7 11 862 5 2 12 6 7 7 12 712 4 4 7 4 6 3 2 39 100 6 2 5 7 6 5 59 100 7 12 6 7 6 6 1252 100 100 100 8 7 6 6 314 4 4 6 7 5 2 4 75 7 100 6 6 7 10 7 722 7 100 5 7 7 7 12 73 7 100 7 11 12 7 11 326 6 7 12 6 8 6 12 714 100 7 100 4 6 7 4 74 100 7 6 5 11 5 7 610 6 4 6 10 11 10 10 1013 100 6 5 9 12 9 7 710 7 7 7 6 2 7 6 716 100 100 7 100 7 11 12 62 5 100 7 4 9 7 12 917 7 6 7 9 6 5 9 916 6 100 7 5 7 7 8 512 100 6 6 100 7 7 3 725 4 3 9 5 7 6 6 718 100 7 12 7 11 7 7 75 6 7 5 5 10 7 6 117 7 7 6 7 4 7 7 911 100 7 6 7 3 8 12 12100 100 7 6 7 11 4 7 1236 7 6 3 7 6 7 7 729 4 5 100 6 8 12 11 618 100 7 100 6 8 6 10 75 100 7 4 5 6 5 7 1141 100 100 100 6 10 6 6 614 7 6 9 7 12 6 7 745 100 7 6 2 6 7 6 743 6 4 12 6 6 6 11 96 3 7 7 7 11 7 5 573 6 7 100 100 7 7 5 723 7 7 6 3 5 7 7 77 100 100 4 6 7 7 6 1023 7 100 7 11 6 6 7 710 7 7 9 100 6 7 7 66 6 6 5 5 11 6 3 711 7 6 7 3 6 6 7 720 2 6 6 6 12 12 2 67 4 7 4 9 6 3 8 724 6 5 5 3 6 2 7 11100 7 3 100 100 7 5 6 7

Page 93

Page 95: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

4 7 5 7 5 8 11 6 620 3 4 9 100 7 6 7 99 6 7 100 7 8 7 7 68 7 4 6 7 3 7 6 76 100 7 5 6 12 7 7 745 7 7 7 12 5 12 7 740 7 4 2 12 7 8 10 1237 4 100 7 11 7 7 6 7100 4 5 12 2 7 12 2 725 4 7 100 7 7 11 7 716 4 6 100 6 7 11 12 78 7 100 7 10 6 6 6 720 5 7 8 6 7 4 12 228 100 100 6 6 5 6 5 1015 100 7 7 12 2 2 10 721 100 6 6 6 12 7 4 1113 7 7 100 11 8 6 9 717 100 2 6 6 10 7 7 79 7 5 2 3 9 11 7 769 2 5 7 6 7 12 7 511 100 7 7 6 7 12 10 1020 7 7 6 4 7 12 6 69 4 3 12 11 7 4 10 717 2 6 7 7 4 10 7 718 7 3 8 6 7 12 11 728 100 100 6 7 3 2 9 72 3 10 4 7 3 6 7 76 3 100 10 5 6 7 2 75 4 7 6 4 6 7 6 1111 6 8 100 7 7 12 11 912 2 100 6 2 2 7 7 735 2 100 5 5 5 9 4 57 100 5 4 6 6 6 7 613 4 6 3 7 7 7 7 1214 5 4 100 9 11 12 7 717 4 4 9 8 100 7 6 5100 100 100 100 10 7 12 7 53 5 100 6 7 4 7 8 1232 7 100 7 12 2 7 12 1221 100 6 7 10 7 2 7 825 5 6 4 6 7 7 12 127 7 2 100 6 11 12 6 75 100 6 5 100 9 12 7 128 4 7 6 6 6 7 8 736 4 5 100 100 11 7 7 78 5 7 7 5 12 5 12 712 100 100 7 3 7 10 4 934 100 100 12 7 6 7 6 1218 100 3 6 9 6 10 6 623 100 5 100 11 7 7 7 543 7 7 7 10 7 7 6 759 7 6 6 4 6 11 5 716 100 4 5 6 5 7 10 713 5 4 100 7 6 6 10 1017 4 100 9 10 7 6 7 720 6 7 7 7 11 6 6 1218 7 6 7 7 6 4 6 722 5 4 4 7 12 7 6 1234 100 100 100 2 6 6 6 510 7 7 6 5 7 7 7 1273 100 8 2 4 8 12 7 83 6 2 4 5 7 6 7 79 7 6 6 7 4 6 5 624 5 3 6 7 12 6 7 534 100 2 100 12 10 12 2 815 5 7 4 9 6 12 4 125 4 7 6 7 7 6 7 297 100 6 7 5 12 2 2 6

Page 94

Page 96: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

4 7 7 5 6 6 12 7 78 5 6 100 10 6 7 12 225 100 7 7 7 5 2 12 740 5 2 100 11 7 7 7 711 7 10 3 7 4 12 6 685 7 7 6 100 100 6 6 710 100 6 4 12 6 7 5 126 100 6 11 5 11 5 7 118 100 5 100 5 6 6 7 716 7 6 7 7 6 11 7 721 5 6 6 3 7 12 7 514 7 5 6 7 5 3 12 76 100 6 7 100 7 4 2 518 100 7 7 11 7 7 3 773 7 3 11 100 7 7 7 125 7 4 7 6 6 7 7 713 5 7 7 4 7 3 11 76 100 100 12 7 2 5 7 1216 7 6 11 6 7 7 2 79 100 100 8 6 7 7 7 77 6 7 100 5 2 7 12 711 100 7 3 4 4 4 6 75 5 4 5 7 12 12 11 978 100 4 6 9 12 11 12 76 7 6 6 100 6 7 7 826 6 7 5 100 7 7 6 630 4 3 7 100 2 11 11 925 7 7 6 6 7 7 7 7100 6 100 5 12 7 3 11 760 100 10 12 100 6 12 12 578 6 100 7 6 100 12 6 710 4 100 9 7 3 6 4 627 100 6 2 11 7 11 11 731 7 100 6 7 10 7 7 1273 7 7 7 100 2 6 7 74 6 7 5 11 4 3 6 76 6 100 6 10 6 2 7 7100 4 100 100 6 8 7 11 337 7 7 7 100 6 3 11 530 7 100 6 5 11 7 7 650 100 100 3 6 7 12 7 72 100 100 6 3 8 6 6 54 5 100 7 6 6 4 6 516 6 2 4 6 6 11 6 732 100 10 7 5 4 6 8 611 3 5 6 12 12 6 12 1227 6 12 5 6 6 7 11 720 6 100 2 7 7 11 6 1229 7 6 7 6 7 12 7 621 7 6 100 7 7 10 3 713 100 5 4 7 6 6 11 721 3 100 9 9 8 6 6 74 100 7 6 7 12 12 12 920 100 5 12 6 6 6 11 78 7 100 5 10 6 6 11 7100 3 2 6 6 4 5 12 624 100 4 5 12 7 3 2 1018 100 100 6 7 11 8 11 74 100 5 100 10 7 3 7 510 100 5 7 7 6 7 6 69 5 6 4 6 2 2 6 717 100 7 6 2 7 7 2 815 2 10 5 6 6 7 10 123 6 6 4 6 12 7 7 732 7 3 7 8 7 12 12 718 7 6 8 9 10 8 11 1016 100 7 6 5 4 6 12 211 100 3 100 6 8 6 2 10

Page 95

Page 97: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

37 7 3 100 8 7 12 10 710 100 6 6 7 12 7 8 106 4 100 100 7 7 7 7 716 7 4 4 5 6 11 4 38 3 6 11 7 7 10 7 65 100 7 5 7 7 6 7 758 7 7 8 6 7 11 7 512 2 7 6 7 6 6 6 53 3 7 6 11 6 6 6 713 100 3 7 8 100 7 7 725 5 5 8 9 7 7 6 614 6 7 100 7 11 9 11 1212 3 100 7 8 6 6 7 660 7 100 8 9 6 7 9 723 100 7 12 11 7 5 12 24 4 100 6 2 8 8 6 812 7 5 5 3 7 8 5 535 100 7 6 4 12 4 4 1230 7 4 100 6 5 12 7 717 100 7 6 6 6 7 8 755 6 5 6 6 11 6 7 912 6 6 100 100 7 6 5 613 100 2 6 4 7 6 2 653 7 7 7 4 6 4 7 1221 100 7 7 6 5 11 2 812 100 7 6 10 2 7 7 613 7 5 6 7 7 12 7 829 5 6 6 5 12 7 11 756 100 100 7 7 100 8 7 716 7 6 7 100 7 12 11 539 100 100 6 6 7 4 10 751 6 3 100 11 7 6 11 773 7 6 100 6 4 7 10 77 4 7 5 9 7 6 5 513 100 7 6 7 12 6 4 74 100 6 9 4 100 11 8 5100 5 7 100 5 6 7 11 719 100 2 5 100 5 6 3 730 100 4 7 6 7 7 7 774 5 4 6 10 6 5 2 1224 100 6 6 5 6 12 12 1211 7 100 5 7 7 5 6 753 7 6 12 5 6 12 7 73 100 7 100 9 7 11 6 624 4 100 7 7 12 7 7 918 100 4 6 11 7 11 7 710 2 100 6 5 3 12 6 78 5 100 7 4 10 4 11 726 7 3 100 6 5 6 5 220 7 6 100 12 12 12 6 22 5 7 6 6 7 12 7 710 7 6 7 4 6 7 11 79 100 100 6 7 3 7 6 717 7 5 2 100 6 5 7 414 5 7 7 10 6 12 12 1233 3 100 3 11 6 3 7 68 100 8 100 100 10 6 7 77 100 10 7 11 10 7 10 67 100 4 6 6 12 6 7 1122 6 6 7 2 8 7 7 836 100 10 5 8 11 7 6 661 100 4 5 6 7 12 12 718 7 5 7 5 6 6 6 919 100 10 11 7 12 12 11 884 100 100 6 100 7 6 6 713 6 5 7 4 100 3 6 1016 100 100 6 100 6 6 6 1211 100 5 7 7 6 11 11 6

Page 96

Page 98: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

23 3 7 7 7 2 7 6 1238 7 4 2 5 2 6 11 722 100 7 6 7 7 6 11 514 5 3 7 7 4 8 7 716 100 6 4 6 100 3 11 713 7 7 4 7 6 4 7 967 100 4 5 4 7 7 3 721 7 3 100 100 7 12 6 92 100 6 100 9 100 6 7 937 7 100 5 100 11 7 7 521 7 100 6 7 2 2 3 310 4 6 10 7 3 7 8 68 100 7 7 7 7 7 7 714 7 7 2 5 5 12 5 611 100 4 6 6 6 11 4 1212 2 8 11 10 8 2 7 1048 100 12 100 4 7 8 6 1126 6 10 6 6 3 3 7 942 4 6 9 8 9 2 4 732 4 3 11 5 5 7 7 735 2 7 5 7 6 11 7 611 100 100 7 6 7 6 4 627 100 100 7 7 6 8 4 910 100 100 2 5 6 12 7 612 100 10 12 6 12 7 5 46 100 5 100 10 11 7 5 711 100 100 100 100 8 7 6 714 100 4 6 5 7 7 7 724 5 2 7 5 11 7 8 714 100 7 6 4 6 7 12 693 7 7 6 7 7 12 8 490 100 3 4 100 7 4 7 418 2 100 4 5 5 11 7 24 6 5 11 100 100 12 7 767 3 100 100 6 4 7 6 1229 7 100 5 4 9 4 6 332 100 5 4 6 7 11 7 754 7 100 5 9 6 4 2 75 2 7 100 10 12 2 2 77 4 5 6 100 6 6 11 757 3 4 7 2 9 12 11 612 7 100 7 4 6 6 7 47 5 100 6 6 8 2 7 612 6 100 7 10 6 4 11 711 7 100 6 7 6 8 6 79 100 7 12 6 6 7 11 622 7 7 3 7 5 7 5 48 100 3 7 12 2 6 7 821 2 6 6 7 7 7 11 779 100 100 6 7 6 7 6 736 100 100 7 6 6 7 8 551 5 3 8 2 12 7 6 739 100 7 6 6 7 4 5 911 6 7 100 7 12 2 12 1126 7 100 7 8 12 7 12 1123 100 7 7 9 7 6 7 614 4 100 4 10 5 12 6 1294 100 7 4 3 7 8 7 735 7 3 5 6 7 5 8 621 100 7 11 10 6 12 7 251 100 7 7 4 6 3 11 1115 7 7 100 6 6 11 7 74 3 4 5 6 7 2 7 59 6 7 100 6 7 6 7 1017 6 7 6 5 7 7 7 55 7 7 5 6 10 7 7 1014 7 4 100 3 2 6 11 713 7 2 6 6 7 12 7 7

Page 97

Page 99: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

14 7 100 100 100 11 6 12 63 5 4 6 11 7 7 2 78 100 100 7 100 6 11 7 765 100 100 7 2 7 7 9 12100 100 2 5 7 6 10 11 622 100 6 4 6 6 6 6 67 100 100 7 2 7 5 12 713 7 7 7 7 12 7 7 1041 5 5 6 7 7 7 6 64 7 3 100 7 6 7 7 736 6 4 7 6 2 12 7 68 6 100 7 5 5 2 8 710 6 7 2 9 3 6 4 715 7 8 6 7 3 6 11 77 3 7 100 7 6 6 7 1027 6 7 11 6 6 11 11 626 7 12 6 100 9 7 4 75 100 12 4 5 7 6 11 520 6 6 4 7 7 7 7 12100 100 5 7 7 6 6 7 124 6 5 7 6 7 7 12 753 7 100 6 5 6 6 7 56 100 6 100 5 7 6 7 83 3 4 100 8 7 8 11 913 5 5 100 5 7 6 6 713 4 100 7 9 2 11 7 1210 3 10 2 5 7 4 9 743 100 7 100 100 6 6 7 330 7 100 6 6 11 4 4 919 7 6 5 5 6 12 9 512 100 3 6 4 7 6 7 59 7 6 4 7 5 6 11 1213 5 5 7 9 7 12 4 910 100 6 100 100 12 6 7 65 7 2 3 9 4 7 7 717 7 6 7 7 12 6 7 716 100 100 3 7 7 7 7 465 7 7 6 5 7 7 12 1210 5 100 100 12 5 6 7 715 7 7 100 12 6 8 7 717 5 7 7 9 6 10 7 715 6 4 6 4 100 6 7 740 7 7 7 6 11 12 12 311 100 7 6 11 2 4 7 74 100 100 100 6 6 7 11 618 7 6 6 6 3 6 7 713 7 6 7 8 6 6 7 1210 5 7 4 10 6 11 7 933 7 7 4 6 11 11 3 716 3 100 7 6 3 4 11 123 100 3 7 6 2 6 4 752 100 7 6 7 7 7 8 620 100 100 7 12 6 12 7 98 7 100 6 100 12 11 4 78 6 6 7 5 7 4 6 721 5 5 6 6 5 6 6 1212 100 6 9 7 11 7 7 129 6 7 6 11 2 6 10 766 100 3 7 6 6 6 11 67 7 7 3 10 11 6 7 841 6 4 7 6 7 6 12 664 100 100 5 9 12 8 7 629 2 5 6 2 5 9 12 79 7 7 6 6 11 6 7 63 6 7 2 7 11 7 6 750 100 6 6 4 7 10 7 577 6 100 2 3 5 7 10 713 5 4 7 7 6 12 6 12

Page 98

Page 100: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10 5 6 7 3 7 7 7 625 7 7 7 5 2 7 7 712 6 6 6 5 6 7 6 25 100 3 7 9 7 4 7 1231 7 100 6 7 6 7 12 1112 6 7 7 6 11 7 6 741 100 7 8 6 6 3 7 1211 7 3 100 5 5 12 2 313 100 6 7 3 7 12 7 728 6 100 7 7 7 10 6 74 7 7 100 100 12 7 7 717 3 3 6 7 5 7 6 78 6 6 3 11 8 6 12 714 7 5 7 7 7 6 7 270 100 7 6 7 11 6 6 716 100 100 100 12 6 7 6 427 5 7 5 100 11 7 7 618 7 6 4 12 6 6 11 517 5 7 100 4 100 12 7 713 100 4 7 7 7 10 7 43 7 7 6 11 7 12 10 79 7 100 100 6 5 7 5 723 100 3 7 6 6 11 10 1233 2 4 7 11 12 7 7 923 7 6 100 4 12 7 2 753 100 4 10 5 11 2 6 717 4 7 100 6 6 6 6 1227 100 4 100 7 7 4 6 614 5 7 2 5 7 6 6 77 100 100 9 6 6 6 12 726 6 7 4 4 6 6 6 724 7 4 7 7 7 7 7 923 7 7 2 6 7 10 10 718 6 7 7 7 11 6 8 455 7 100 7 2 12 12 6 78 100 3 100 3 6 5 7 66 5 7 7 7 11 6 7 738 5 7 5 100 12 7 7 73 100 6 100 4 6 6 8 77 7 4 4 11 7 6 6 26 100 5 8 100 3 7 12 964 100 7 7 4 6 11 7 614 100 6 100 6 7 4 12 127 100 5 4 4 7 8 5 113 4 7 7 5 11 7 6 76 7 2 7 6 6 7 7 639 6 6 5 6 10 7 6 711 6 3 100 6 9 6 6 740 7 2 5 12 7 6 2 617 100 2 7 6 6 10 7 721 7 6 4 100 7 7 7 732 5 4 9 6 11 7 7 7

Page 99

Page 101: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

10.5 Camera Problem Open-Loop Raw Results

Random 1 Layer 2 Layer 3 Layer 4 Layer 5 Layer 6 Layer 7 Layer 8 Layer40 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 734 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 732 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 743 7 7 7 7 7 7 7 757 7 7 7 7 7 7 7 739 7 7 7 7 7 7 7 736 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 737 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 748 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 731 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 732 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 750 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 740 7 7 7 7 7 7 7 736 7 7 7 7 7 7 7 732 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 739 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 735 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 7

Page 100

Page 102: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

9 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 748 7 7 7 7 7 7 7 738 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 733 7 7 7 7 7 7 7 746 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 731 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 735 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 77 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 753 7 7 7 7 7 7 7 730 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 731 7 7 7 7 7 7 7 730 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 77 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 742 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 738 7 7 7 7 7 7 7 7

Page 101

Page 103: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

22 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 737 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 726 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 78 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 78 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 731 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 738 7 7 7 7 7 7 7 748 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 741 7 7 7 7 7 7 7 751 7 7 7 7 7 7 7 78 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 726 7 7 7 7 7 7 7 736 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 732 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 756 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 732 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 730 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 730 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 77 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 736 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 7

Page 102

Page 104: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

26 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 763 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 741 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 737 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 743 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 731 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 739 7 7 7 7 7 7 7 732 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 730 7 7 7 7 7 7 7 731 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 77 7 7 7 7 7 7 7 737 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 767 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 742 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 730 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 738 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 77 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 757 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 735 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 7

Page 103

Page 105: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

32 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 745 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 78 7 7 7 7 7 7 7 78 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 738 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 753 7 7 7 7 7 7 7 726 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 734 7 7 7 7 7 7 7 733 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 753 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 734 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 736 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 736 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 734 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 751 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 735 7 7 7 7 7 7 7 733 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 730 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 77 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 735 7 7 7 7 7 7 7 78 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 726 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 7

Page 104

Page 106: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

17 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 78 7 7 7 7 7 7 7 736 7 7 7 7 7 7 7 732 7 7 7 7 7 7 7 733 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 737 7 7 7 7 7 7 7 77 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 744 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 730 7 7 7 7 7 7 7 737 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 731 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 732 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 730 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 748 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 730 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 755 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 746 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 735 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 77 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 77 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 7

Page 105

Page 107: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

44 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 734 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 741 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 733 7 7 7 7 7 7 7 738 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 757 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 733 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 741 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 77 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 766 7 7 7 7 7 7 7 745 7 7 7 7 7 7 7 748 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 730 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 732 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 730 7 7 7 7 7 7 7 739 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 734 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 737 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 7

Page 106

Page 108: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

51 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 745 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 750 7 7 7 7 7 7 7 733 7 7 7 7 7 7 7 744 7 7 7 7 7 7 7 735 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 758 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 735 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 78 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 77 7 7 7 7 7 7 7 78 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 737 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 734 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 735 7 7 7 7 7 7 7 77 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 742 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 78 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 732 7 7 7 7 7 7 7 750 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 726 7 7 7 7 7 7 7 731 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 742 7 7 7 7 7 7 7 776 7 7 7 7 7 7 7 7

Page 107

Page 109: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

9 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 734 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 77 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 732 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 741 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 747 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 730 7 7 7 7 7 7 7 732 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 735 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 737 7 7 7 7 7 7 7 731 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 740 7 7 7 7 7 7 7 7

Page 108

Page 110: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

19 7 7 7 7 7 7 7 732 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 734 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 78 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 731 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 726 7 7 7 7 7 7 7 733 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 726 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 726 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 731 7 7 7 7 7 7 7 730 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 738 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 730 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 738 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 7

Page 109

Page 111: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

15 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 737 7 7 7 7 7 7 7 735 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 730 7 7 7 7 7 7 7 757 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 750 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 735 7 7 7 7 7 7 7 726 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 733 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 739 7 7 7 7 7 7 7 733 7 7 7 7 7 7 7 731 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 738 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 748 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 741 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 733 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 762 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 732 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 735 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 744 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 7

Page 110

Page 112: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

29 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 77 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 78 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 77 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 736 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 744 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 739 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 761 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 78 7 7 7 7 7 7 7 77 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 726 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 736 7 7 7 7 7 7 7 745 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 733 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 7

Page 111

Page 113: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

13 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 742 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 731 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 735 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 732 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 750 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 731 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 748 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 735 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 739 7 7 7 7 7 7 7 748 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 735 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 743 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 743 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 745 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 730 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 734 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 736 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 7

Page 112

Page 114: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

19 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 730 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 78 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 739 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 740 7 7 7 7 7 7 7 738 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 732 7 7 7 7 7 7 7 755 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 77 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 730 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 737 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 77 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 735 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 745 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 713 7 7 7 7 7 7 7 742 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 720 7 7 7 7 7 7 7 731 7 7 7 7 7 7 7 734 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 7

Page 113

Page 115: Information Based Model Exploration · MEng Computer Science Final Year Project Information Based Model Exploration Daniel Barry danbarry16@googlemail.com supervised by Prof. Daniel

MEng Thesis 1409 8388

12 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 77 7 7 7 7 7 7 7 714 7 7 7 7 7 7 7 730 7 7 7 7 7 7 7 756 7 7 7 7 7 7 7 716 7 7 7 7 7 7 7 712 7 7 7 7 7 7 7 728 7 7 7 7 7 7 7 723 7 7 7 7 7 7 7 729 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 746 7 7 7 7 7 7 7 732 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 727 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 726 7 7 7 7 7 7 7 748 7 7 7 7 7 7 7 731 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 715 7 7 7 7 7 7 7 731 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 742 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 79 7 7 7 7 7 7 7 722 7 7 7 7 7 7 7 710 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 718 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 717 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 719 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 724 7 7 7 7 7 7 7 78 7 7 7 7 7 7 7 721 7 7 7 7 7 7 7 725 7 7 7 7 7 7 7 726 7 7 7 7 7 7 7 711 7 7 7 7 7 7 7 7

Page 114