98
A Serious Game on Sustainable Development Using Agent Based Modelling Energy Wars André Gonçalo Liberato Folgado Thesis to obtain the Master of Science Degree in Mechanical Engineering Supervisors: Profª Tânia Alexandra dos Santos da Costa e Sousa Profª Tanya Vianna de Araújo Examination Committee Chairperson: Prof. Mário Manuel Gonçalves da Costa Supervisor: Profª. Tânia Alexandra dos Santos Costa e Sousa Members of Committee: Prof. António José da Costa Silva July 2014

A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

A Serious Game on Sustainable Development

Using Agent Based Modelling

Energy Wars

André Gonçalo Liberato Folgado

Thesis to obtain the Master of Science Degree in

Mechanical Engineering

Supervisors: Profª Tânia Alexandra dos Santos da Costa e Sousa

Profª Tanya Vianna de Araújo

Examination Committee

Chairperson: Prof. Mário Manuel Gonçalves da Costa

Supervisor: Profª. Tânia Alexandra dos Santos Costa e Sousa

Members of Committee: Prof. António José da Costa Silva

July 2014

Page 2: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

I

Page 3: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

II

Abstract

The continuing depletion of natural resources and their increasing exploration costs have become a

major focus for society. There is a growing recognition of the need to sustain an ecologically-balanced

environment, while at the same time, the need of exploiting natural resources (at affordable prices) to

satisfy the ever-increasing demands. Serious Games are a tool that can add entertainment and increase

the awareness towards a more sustainable future.

In this work, an energy model was developed to become the serious part of a Serious Game – Energy

Wars. The game pretends to simulate an oil scarcity scenario, where energy supply has to be

progressively substituted by renewable resource. The objective of this game is to simulate the dispute

for the last fossil fuels available on Earth. A platform was built to reproduce the game’s environment.

This platform is built under compromises between the reproduction of how real world works and the

restrictions imposed by game designers.

The model here presented intends to provide tools to simulate the energy companies’ behaviour.

These companies are able to compete for new concessions through auctions, build structures, hire

units, and produce energy to supply market’s demand. At each iteration, a company sees all possible

investment options and based on its present situation and intentions, can choose according to its goals.

A fields’ evaluation framework was developed, computing several economic metrics to support the

decision process. This evaluation shows that oil fields have higher return when compared with

renewable resources, however, with a higher risk.

Key-words: Serious Games, Oil&Gas, Energy Projects’ Evaluation, Forecasting, Monte Carlo, Risk

Management

Page 4: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

III

Resumo

O declínio dos recursos naturais, juntamente com o aumento dos seus custos de exploração tornaram-

se alarmantes para a sociedade. É reconhecida a necessidade de garantir um ambiente ecologicamente

equilibrado enquanto, ao mesmo tempo, que explora os recursos naturais para satisfazer a procura,

que tem sido crescente. Serious Games são uma ferramenta que consegue juntar entretenimento e

promover a sensibilização para um futuro sustentável.

Neste trabalho, foi desenvolvido um modelo energético para se tornar no modelo “sério” de um

Serious Game – Energy Wars. O jogo simula um cenário onde o petróleo é escasso e a oferta de energia

petrolífera é, progressivamente, substituída por fontes renováveis. O objectivo deste jogo é simular a

disputa pelos últimos combustíveis fósseis na Terra. Foi construída uma plataforma para reproduzir o

ambiente do jogo. Esta plataforma teve que balancear o modo como o mundo real funciona e as

restrições impostas pelos criadores do jogo.

O modelo apresentado fornece ferramentas para simular o comportamento das empresas energéticas.

Estas companhias competem por novas concessões através de leilões. Podem construir estruturas,

contratar unidades e produzir energia para responder a procura do mercado. Em cada iteração, a

companhia vê todas as opções de investimentos possíveis e, baseada na sua presente situação e

intenções, pode escolher o seu plano de acção. Foi desenvolvido um modelo de avaliação de

concessões, que usa várias métricas económicas no processo de decisão. Esta avaliação mostra que

campos petrolíferos têm um retorno mais alto que os recursos renováveis, no entanto, com um risco

superior.

Page 5: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

IV

Acknowledgements

Thank you. This was the only thing that I intend to stay/write. I have said it every time that I felt it

necessary. Why more? However, I realise that Acknowledgments are not for me to write, are for the

(few) ones that will eventually read this page. Even knowing that most of them (the ones I want to

acknowledge) will never understand a word here written or are not here anymore.

Thus, for the ones that would only recognize their name, aqui vão umas palavras:

Obrigado Avó Lena e Avô João, por tudo. Sem vocês não teria sido tão fácil.

Obrigado Avó Lálá…nunca sei onde estás, mas penso em ti (quase) todos os dias. Avô Liberato: não te

escrevo nada porque nunca poderás ler…. mas se lesses diria que ensinaste-me muito e coisas assim.

I write this words for you, because among these people, you certainly have a place. I know that you

did understand me, and you were always there; and you are still. For the rest of you: Nicky, Sado e

Ulmar - .

Now for the polyglots:

Thank you Tânia for the opportunity of doing this work.

Ten years have passed…… (Shame on me!!). Although a lot of time have passed, fewer were the ones

that shared this journey. Mãe, Pai e Diogo, thank you for trying to understand me. Pai: Thank you for

everything that you still teach me, good and bad, for everything that you allow me to do and all the

efforts that you have done for us. Mãe: Every time you were there, I will never forget that. Gordo

Estúpido: I know that you no longer fit the profile but…. Thank you for sharing everything with me.

Uncles and Cousins: Thank you all, for all the good moments that help me through the time. For being

there every time.

I know that have been a good (missing) friend but thank you for the ones that continue to call.

IST: In so many years you gave a lot, especially the last few years. Thank you Zeus for the cooking

lessons, Ricardo for the deep discussions and teaching me the differences between a cookie and a

cake; and Mário for the history lessons :p. Thank you Cristina, for sharing the long nights spent at the

office and of course, outside of it.

Anita: BOO! ….. I think I will write some words to you in the end.

I was almost forgetting:

Financial support was given by Agência de Inovação through the project Energy Wars (QREN7929)

Page 6: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

V

Index

Abstract ................................................................................................................................................... II

Resumo ................................................................................................................................................... III

Acknowledgements ................................................................................................................................ IV

Index ........................................................................................................................................................ V

List of Tables .......................................................................................................................................... VII

List of Figures ........................................................................................................................................ VIII

Acronyms ................................................................................................................................................ IX

Notation ................................................................................................................................................. XI

1 Introduction ..................................................................................................................................... 1

1.1 Objectives ................................................................................................................................ 1

1.2 Thesis Disposition .................................................................................................................... 2

2 Gaming & Simulation ....................................................................................................................... 4

2.1 Video Games’ Industry ............................................................................................................ 5

2.2 Serious Games ........................................................................................................................ 8

2.3 Games on Sustainable development ....................................................................................... 9

2.4 Gamification .......................................................................................................................... 10

2.5 Self-Determination Theory .................................................................................................... 12

3 Energy Wars .................................................................................................................................. 15

3.1 EW Storyline .......................................................................................................................... 15

3.2 EW Gameplay ........................................................................................................................ 16

3.3 EW’s components .................................................................................................................. 17

3.4 The Environment ................................................................................................................... 18

3.5 A Company ............................................................................................................................ 20

3.6 A Game’s Turn ....................................................................................................................... 22

4 Model implementation ................................................................................................................. 25

Page 7: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

VI

4.1 Energy Resources .................................................................................................................. 26

4.2 Initial conditions .................................................................................................................... 27

4.3 World configuration .............................................................................................................. 30

4.4 OOP: Classes and properties ................................................................................................. 36

4.5 Decision clusters .................................................................................................................... 38

4.6 Deliberative Agents ............................................................................................................... 42

5 Decision Process ............................................................................................................................ 48

5.1 Energy Prices and Interest Rates Forecasting ....................................................................... 49

5.2 Field’s economics .................................................................................................................. 55

5.3 Risk Management .................................................................................................................. 63

5.4 Auction .................................................................................................................................. 66

6 Final Remarks ................................................................................................................................ 69

6.1 Conclusions ............................................................................................................................ 69

6.2 Future Work .......................................................................................................................... 70

7 References ..................................................................................................................................... 72

Annex A - Serious Games on Sustainable Development ....................................................................... A1

Annex B - Main script’s source code ..................................................................................................... A2

Annex C – Cost of Renewable Energy: Solar Example, Summary Results ............................................. A5

Page 8: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

VII

List of Tables

Table 2.1 – Differences between entertainment games and serious games .......................................... 8

Table 3.1 – Units requirements and actions performed ....................................................................... 18

Table 4.1 – Model’s initial conditions ................................................................................................... 28

Table 4.2 – Initial energy prices and monthly variations ...................................................................... 28

Table 4.3 - World area to split fields per regions .................................................................................. 30

Table 4.4 - Resource distribution .......................................................................................................... 31

Table 4.5 - Oil Reserves’ values ............................................................................................................. 32

Table 4.6 - Rank distribution ................................................................................................................. 32

Table 4.7 - Structures power level......................................................................................................... 34

Table 4.8 - Offshore matrix ................................................................................................................... 35

Table 4.9 - Oil field’s properties ............................................................................................................ 38

Table 4.10 - Decision cluster’s matrix.................................................................................................... 39

Table 4.11 - Action’s properties. Buy Land’s example .......................................................................... 41

Table 5.1 – Inputs for the forecast models ........................................................................................... 52

Table 5.2 – Oil field financial sheet ....................................................................................................... 60

Table 5.3 - Financial parameters' formulas ........................................................................................... 61

Page 9: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

VIII

List of Figures

Figure 2.1 - Global consumer/end-user spending by segment ............................................................... 7

Figure 2.2 - Global video game market by region ................................................................................... 7

Figure 2.3 - Separating the term gamification from SG (Deterding et al., 2011b) ................................ 11

Figure 2.4 - The Pyramid of Game Elements ......................................................................................... 11

Figure 2.5 - SDT: Amotivation, Extrinsic and Intrinsic motivations ....................................................... 13

Figure 3.1 – EW: CEO scheme (Duarte and Folhadela, 2013) ............................................................... 16

Figure 3.2 - EW Gameplay ..................................................................................................................... 17

Figure 3.3 – EW’s components .............................................................................................................. 18

Figure 3.4 – Environment’s properties .................................................................................................. 19

Figure 3.5 – Companies’ CEOs (Duarte, 2012a)..................................................................................... 20

Figure 3.6 - Companies properties ........................................................................................................ 21

Figure 3.7 – Game’s turn ....................................................................................................................... 23

Figure 4.1 - Energy Resources ............................................................................................................... 27

Figure 4.2 - Oil price random path. (nruns = 100) ................................................................................. 29

Figure 4.3 - Fields' ranking and structures. Platinum Oil Rig (Biodroid - 3D art) .................................. 32

Figure 4.4 - World tree diagram ............................................................................................................ 34

Figure 4.5 – OOP: Fields’ hierarchy ....................................................................................................... 36

Figure 4.6 - Available actions' implementation (ml = 20) ..................................................................... 40

Figure 4.7 - Deliberate on cluster’s options .......................................................................................... 41

Figure 4.8 - Actions planning implementations for a) planned and executed status and b) pending status ............................................................................................................................................................... 42

Figure 4.9 - BDI agent's architecture (adapted from (Bratman, 1987)) ................................................ 44

Figure 4.10 – Model’s algorithm diagram ............................................................................................. 47

Figure 5.1 - Oil Concession's evaluation model. .................................................................................... 49

Figure 5.2 – MC simulation of crude oil (Brent) prices.......................................................................... 53

Figure 5.3 - MC simulation of North America Residential and Industrial average end user electricity prices ..................................................................................................................................................... 54

Figure 5.4 – MC annual average of the real interest rates simulation .................................................. 54

Figure 5.5 - Discounted Cash Flow Process (Brealey and Myers, 2012) ................................................ 56

Figure 5.6 - Production profile for an oil field (Robelius, 2007) ............................................................ 57

Figure 5.7 - Typical Upstream O&G Project Nominal Net Cash Flow (James, 2009) ............................. 58

Figure 5.8 - Discount rate impact on cumulative net cash flow. (James, 2009) ................................... 62

Page 10: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

IX

Acronyms

BDI Belief – Desire – Intention

AI Artificial Intelligence

AL Actions’ List

AdI Agência de Inovação (in Portuguese)

ABM Agent Based Models

BEG Biodroid Entertainment Group

CAPEX Capital Expenditure

CEO Chief Executive Officer

ESCS Escola Superior de Comunicação Social

ESM Energy Sector Model

EU European Union

EW Energy Wars

GDD Game Design Document

GDP Gross Domestic Product

HQ Headquarters

IST Instituto Superior Técnico (in Portuguese)

LCOE Levelized Cost of Energy

HP Health Points

POMDP Partly Observable Markov Decision Process

MDP Markov Decision Process

Mb Million barrels

ML Memory limit

NPV Net Present Value

OIIP Oil Initially in Place

OPEC Organization of Petroleum Exporting Countries

OP Optimal Policy

OOP Object Orientated Programming

OPEX Operational Expenditure

QREN Quadro de Referência Estratégico Nacional (in Portuguese)

RF Recovery Factor

R/P Reserves to Production ratio

R&D Research & Development

S&G Simulation & Gaming

TD Turns to Destruction

Page 11: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

X

TTD Turns to Total Depletion

SCF Spare capacity factor

SDT Self-Determination Theory

SG Serious Games

STB Stock tank barrel

TBS Turn Based Strategy

URR Ultimate Recoverable Reserves

USA United States of America

VG Video Games

WWS Wind, Water and Solar

NPV Net Present Value

HMV Hull-White-Vasicek

GMB Geometric Brownian Motion

SDE Stochastic Differential Equations

MRM Mean Reversion Model

ARIMA Autoregressive Integrated Moving Average

SDE Stochastic Differential Equation

MC Monte Carlo

NDF Normal Distribution Fitting

WACC Weighted Average Cost of Capital

VTS Value of Tax Shields

EIA Energy Information Agency

BP British Petroleum

PI Profitability Index

IRR Internal Rate of Return

E&P Exploration and Production

EOR Enhanced Oil Recovery

PSA Production Sharing Agreements

SA Services Agreements

LCOE Levelized cost of energy

Page 12: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

XI

Notation

t_fields Number of fields in the world (scalar)

A Region area percentage (vector)

N Number of fields in a region (vector)

NA Auxiliary matrix for resource distribution (matrix)

C Fields per resource in a region (matrix)

AC Auxiliary matrix for rank distribution (matrix)

D Resource distribution (matrix)

R Rank distribution (matrix)

F Fields per resource and rank in a region(matrix)

r Region index

j Resource index

k Rank index

l Field index

B Bronze field

S Silver field

G Gold field

P Platinum field

D Diamond field

Hp Structure’s health points

Ttd Turns to structure’s destruction

Gb Billion barrels

O Offshore matrix

o Offshore logical value

oiip Oil initial in place [bbl]

Rf Recovery factor [%]

production Field’s production

prodcap Installed structure‘s production capacity

spf Spare capacity factor

s Structure index

𝐴𝐿𝑖𝑡 Actions’ list at turn t for company i

dal Number of actions ate at turn t for company i

𝑛𝑠𝑖𝑡 Number of states to where a company i can evolve at time t

bbl Oil barrels

FS Set of operational structures in a field

Page 13: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

XII

t Time or turn

i Company index

reserves Stock tank barrels (yet to be explored)

dip_city number of diplomats available in the same region

method Feature’s released by an action

cost Action’s cost

time_tb Time for action to be terminated

ml Memory Limit

a Action type

s Slot index

𝑟 𝐴𝐿𝑖𝑡

𝑎𝑠 Decision Slot

fields_number Maximum number of fields released at a turn

stunlock Initial period that don’t release any field

pull_field Mean frequency which a field be released

overlap Overlapping parameter which allows to release higher ranks’ fields

σ Standard deviation

X𝑡 State vector of process variables

𝜇(𝑡) Generalized expected instantaneous rate of return matrix

𝐷(𝑡, 𝑋𝑡) Diagonal matrix, where each element along the main diagonal is the corresponding element of the state vector 𝑋𝑡

𝑉(𝑡) Instantaneous volatility rate matrix

𝑆(𝑡) Mean reversion speed

𝐿(𝑡) Mean reversion levels

𝑑𝑊𝑡 Brownian motion vector

n_sim Number of random walks used in the Monte Carlo simulations

nv_forcast Number of values that are pretended to be forecasted ahead

𝐾𝑒 Required return to levered equity

𝐾𝑑 Required return to debt

𝐸𝑡 Value of equity

𝑇 Effective tax rate

𝑊𝐴𝐶𝐶𝑡 Weighted average cost of capital

𝑦 Project’s development year

𝑐𝑎𝑝𝑒𝑥 Capital expenditure

𝑟𝑐𝑐𝑗 Resource specific capital cost

𝑞𝑗 Resource average production

𝑟𝑒𝑣𝑦 Project’s revenue in year 𝑦

Page 14: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

XIII

𝑞𝑦 Quantity produced in year 𝑦

𝑝𝑦𝑖 Expected price in year 𝑦 from company i

𝑟𝑜𝑦𝑦𝑟 Royalties paid to host region 𝑟 in year 𝑦[%]

𝑡𝑐𝑦 Transport cost in year 𝑦

𝑝𝑐𝑦 Production cost in year 𝑦

𝑜𝑝𝑒𝑥𝑦 Operation expenditure in year 𝑦

𝑝𝑟𝑜𝑓𝑖𝑡_𝑏𝑡𝑦 Profit before tax in year 𝑦

𝑡𝑎𝑥𝑦𝑟 Region 𝑟 tax in year 𝑦

𝑐𝑓𝑦 Expected undiscounted cash flow in year 𝑦

𝑌 Project expected duration

𝑟𝑦𝑖 Company 𝑖 expected discount rate in year 𝑦

𝑁𝑃𝑉𝑝𝑖 Company 𝑖 NPV for project 𝑝

𝑃𝐼𝑝𝑖 Company 𝑖 profitability index for project 𝑝

𝐼𝑅𝑅𝑝𝑖 Company 𝑖 internal rate of return for project 𝑝

𝐷𝑃𝑝𝑖 Company 𝑖 discount rate for project 𝑝

𝐿𝐶𝑂𝐸 Levelized Cost of Energy

𝑚𝑢 Mean parameter used to generate bid value

𝑏𝑖𝑑𝑝𝑖,1 Company 𝑖 first bid to project 𝑝

𝑏𝑖𝑑𝑝𝑖,2 Company 𝑖 second bid to project 𝑝

$MM Million U.S. Dollars

Page 15: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and
Page 16: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

1

1 Introduction

This thesis intends to describe a model that aims to simulate oil/energy companies in a scarcity

scenario. However, this work has the objective to provide, along with other models, the background

for a game called – Energy Wars (EW). This means that the model has to be contextualized in a gaming

reality. This work which has the intention of raising the awareness on sustainable development

problems showing how Oil&Gas Upstream industry works, takes the definition of a – Serious Game.

The project EW is a partnership between Instituto Superior Técnico (IST), Escola Superior de

Comunicação Social (ESCS), and Biodriod Entertainments Group (BEG), each one with distinct roles.

The objective is to create a video game that illustrates the dispute for the last natural resources

available on Earth. Compared with similar products, this game has the following innovative

characteristics: (1) it includes an agent-based financial model that captures oil prices fluctuations that

are essential to understand this commodity’ behaviour (Buyuksahin et al., 2013); and (2) also includes

a framework to access investment risks on energy’s projects, such as oil exploitation investments.

The game pretends to simulate an oil scarcity scenario, where energy supply has to be progressively

substituted by renewable resource. Therefore companies’ dispute for the remaining oil on earth will

be the conflict’s epicentre. Due to its scarcity, companies will have to manage oil reserves wisely and

progressively invest in renewable energy with the purpose of ensuring company’s long-term wealth.

With various opponents across the world, the ultimate goal is to control global energy supply, reaching

eventually a victory condition.

A platform was developed to include all game’s aspects pretended by Biodroid. The platform allows

the player to perform action such as build facilities, hire units that can unleash attacks on enemy’s

structures and contract scientists to produce knowledge allowing the release of new features. This

platform simulates the environment where the energy companies are immersed.

Energy related elements were given more detail. An oil upstream industry was simulated. All processes

that the oil undergoes, since its exploration to the production phase were implemented. Aspects like:

(1) licensing; (2) fiscal systems; (3) field evaluation; (4) auctions; and (5) production profile were

included. Renewable technologies were evaluated to substitute the natural resources.

1.1 Objectives

The objective of this work is to create a model able to simulate Energy companies´ using agents based

modelling. In the future, this model has to be integrated with a macroeconomic and financial model

to serve as a background for a computer game called EW. Being a serious game, this game aims to

educate, not just to entertain. Therefore real features had to be included in order to provide some

Page 17: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

2

realism to the game. This game creates a scenario where oil is a scarce resource and progressively has

to be substitute for renewable resources. Therefore, the objective is to simulate an oil market, as close

to reality as possible. Moreover, the model aims to evaluate renewable resources technologies and to

propose to substitutes for the only natural (finite) resource here considered –Oil.

The model’s output pretends to provide decision tools that can be used by an artificial Intelligence (AI)

that will be developed by Biodroid. Both the platform and the energy company’s simulation allow to

test and advise designers on the game’s balance.

1.2 Thesis Disposition

In the second chapter, the Gaming & Simulation subject is defined and the relevance of the video game

industry shown. Serious Games (SG), their applications and advantages are presented. The EW is

classified has an example, of SG, on sustainable development and natural resources depletion.

Gamification is approached to demonstrate that games´ elements are used outside the video games,

in a wide range of fields ranging from education to management in order to take advantage of its

benefits (Werbach and Hunter, 2012). Moreover, Self-Determination Theory (SDT) is used to show how

people structure their motivations, when performing a task, and how games and gamification help in

making tasks more appealing.

In the third chapter, the EW’ storyline is described. Afterwards, the gameplay is discussed to provide

a better understanding of the game concept and the proxies followed by the energy companies. The

platform to simulate the EW´s environment is explained. Also, companies are characterized and

corporate data is presented and organised to show the information that can be perceived from the

environment. A game’s turn is described, from a player point of view, to better comprehend all game´s

processes. Furthermore, compromises that were made on the conception to cope with the game

designer’s intentions and real world aspects, are also discussed.

The fourth chapter describes the model’s implementation. Resources used to supply the energy

demand are discussed here. Initial conditions that need to be introduced to run the model are

presented. It is explained how the world is configured, i.e. how the game´s components are introduced

and what properties and functions they have. In detail, it is described how the ABM approach on both

companies/agents is implemented through an object orientated style using deliberative agents. To

facilitate the decision process, decision clusters were developed to characterize each action. Is also

described how agents, at each turn, perceive every possible action that can be performed.

In chapter five a framework is developed to evaluate new fields acquisitions. Price and discount rates

are forecasted using Monte Carlo methods to supply a discount cash flow model, to compute several

economic metrics to support the decision process. Fiscal systems properties were also included in the

Page 18: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

3

cash flow model. Risk management features were also implemented. The auction process is described

in the end of the chapter.

The sixth chapter presents the final remarks on the work developed. Conclusion withdrawn from the

results and mode’s overall consideration are also discussed. To finalise this thesis, future work is

suggested towards a further development of the model.

Page 19: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

4

2 Gaming & Simulation

This work is related with the Gaming & Simulation (G&S) subject. The definitions of Game and

Simulation were never consensual across society. For the last four decades the designation of G&S

included methodologies used in education, training, consultation and research. This field has seen an

impressive development, both in the variety and richness of games types and in the spectrum of

application users. Most people agree that the imitation of a real-world process or system over time

should be designated as Simulation, while Gaming is believed to serve only amusement purposes.

However, as it will be discussed, games can be an important simulation tool.

Crookall and Saunders (1989) viewed simulation as a representation of some real-world system that

takes into account some aspects of reality for participants or users. Key features of simulations include:

(1) the representation of real-world systems; (2) the existence of rules and strategies that allow

flexible and variable simulation activity to evolve; and (3) a low cost of error for participants which are

generally contained within the game world , protecting them from the more severe consequences of

real-life mistakes (Garris et al., 2002). Moreover, Crookall et al. (1987) noted that a game can surpass

the limits of any real-world representation, becoming a real system on its own right.

Why Games? - Games are an extremely valuable context for the study of cognition as inter (action) in

the social and material world. They provide a representational trace of both individual and collective

activity and how it changes over time, enabling the researcher to unpack the bidirectional influence of

self and society (Steinkuehler, 2006). As Wittgensen (1958) said of a game – “It is almost impossible to

define, but we recognize one when we see it”. Caillnois (1961) has provided, at the time, perhaps the

most comprehensive analysis of games per se, describing a game as an activity that is voluntary and

enjoyable, separate from the real world, uncertain, unproductive in that the activity does not produce

any goods of external value, and governed by rules. Nowadays, external value is proved to be extracted

from games. The player’s behaviour when facing a challenge within a game’s environment is similar to

the verified in the real world. Large scale simulations are now possible, due to wide (and fast)

exposition that a game/simulation may experience. Consequently, high quality information can be

retrieved and stylized actions can be understood. A good example was given during a strike made by

an American pilot on the Iraq’s wars. The pilot, while on a mission, was accused of firing (real) innocent

people acting just like playing a war game (McWhertor, 2010). This intolerable behaviour is the proof

that SG can be effective on training a pilot for real-life missions. Furthermore, SG could be used to

access pilot’s profile and understand if it is suitable for a War environment and prevent this kind of

episode.

Page 20: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

5

Although it´s a recent research field, games and play can be incredibly powerful tools for socialization

and collaboration and in fact indicate real potential for therapy and rehabilitation. McGonigal’s (2011)

work shows that the game’s challenges can be overlaid upon real world activities to motivate and

engage, and that play can be used effectively for socialization as well as therapy. Studies illustrate that

games can promote learning (Eck, 2006). Spatial abilities like: (1) peripheral vision; (2) way-finding

skills; (3) hand-eye coordination; and (4) mental rotation can be also improved by playing arcade games

(De Lisi and Wolford, 2002; “The Neurology of Gaming,” 2012). Further potential benefits of games

include improved self-monitoring, problem recognition and problem-solving, decision-making, multi-

tasking (Abbott, 2013). A significant improvement of a better short-term and long-term memory, and

increased social skills such as collaboration, negotiation, and shared decision-making (Mitchell and

Savill-Smith, 2004). Additionally, on a long-term, SG can be used to improve public policy through a

game-based learning and simulation processes (Sawyer and Rejeski, 2002)

Games can also proportionate some negatives effects, such as: (1) violent content increases aggressive

responses; (2) violent game play increases active suppression of emotional responses; (3) long-term

playing can lead to obesity, attention problems, and poor school performance; (4) increase risk of

seizures in people with epilepsy or photo sensibility disorder (“The Neurology of Gaming,” 2012). These

effects are usually correlated when users expose themselves for too long or play inappropriate games

for their age.

2.1 Video Games’ Industry

Video Games (VG) Industry is already one of the most important forms of entertainment, see Figure

2.1. This industry nowadays has the second highest growth rate, just after the TV subscription and

licenses fees, with 6.23% and 5.9%. During the pre-crises period (before 2009) the VG industry was the

only with a two digit growth, reaching 25.5% in 2007. It´s expected that in this year (2014), VG will be

the one with the highest potential (Global entertainment and media outlook 2012–2016: Industry

Overview, 2012).

Insights on U.S. games demographics show impressive results. There are 58% of Americans who play

video games, two gamers in each game-playing household and on average each household owns at

least one dedicated game console, PC or Smartphone. The average gamer has 30 year old, the average

buyer has 35 and only 55% are male (ESA, 2013). Analysing the video game market values by region,

see Figure 2.2. There three representative markets: (1) North American; (2) European; and (3) Asian.

It is perceived that it´s been increasing every year on every region with special reference to Asia pacific,

which has the biggest market share and the highest growth rate.

Page 21: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

6

The study presented above shows that the video game is one of the best communication channels to

reach the average consumer. Moreover, can be an important tool to increase, in this case, awareness

towards the sustainable development because people with more purchase and influencing power are

the ones that play games.

Page 22: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

7

Figure 2.1 - Global consumer/end-user spending by segment (Global entertainment and media outlook 2012–2016: Industry Overview, 2012)

Figure 2.2 - Global video game market by region (Global entertainment and media outlook 2011–2015: Events & Trends, 2011)

Page 23: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

8

2.2 Serious Games

How can a game be serious? This question raised by the idea that a game serves only for

entertainment. Although fun must be present in order to maintain the player’s engagement, it can also

influence user’s emotions and allows for the creation of a key element – motivation, see section 2.5.

However, fun is not an ingredient or something you put in – is a result (Michael and Chen, 2006). The

oxymoron SG appears to follow the lead set by Sawyer and Rejeski (2002). Therefore, we will first

review the origins of the term and analyses how it evolved to designate “games that do not have

entertainment, enjoyment or fun as their primary purpose” (Michael and Chen, 2006). Susi et al. (2007)

suggest four factors, see Table 2.1, that differentiates entertainments from serious games: (1) task vs

experience; (2) focus; (3) simulations; (4) communication.

Table 2.1 – Differences between entertainment games and serious games (Susi et al., 2007)

Serious Games Entertainment Games

Tasks vs. rich experience

Problem solving in focus Rich experience preferred

Focus Important elements of learning To have fun

Simulations Assumptions necessary for workable

simulations Simplified simulation process

Communication Should reflect natural (i.e. non

perfect) communication Communication is often perfect

Analysing Table 2.1, serious games represent a challenging experience for players, compared with

entertainment games. The player is playing, but at the same time, is being subjected and has to reflect

on problems to achieve the intended goal. Communication should be non-perfect to a point where a

player can surpass the gaps, employing a considerable effort. If it is considered too complex, the game

loses fun, and subsequently the player.

The idea of using video games, to deal with serious matters is also older than expected. According to

Gudmundsen (2006): “America’s Army was the first successful and well-executed serious game that

gained total public awareness”. This was an $8 million game developed by the U.S. Army to attract

new recruits. Not only does America’s Army encode the army’s values into the game play, but it is also

designed so that veterans, military personnel, and civilians can play together, creating an army-owned

space to interact with the public (Li, 2004). But games matching the definition drawn by Sawyer (2002)

were released long before America’s Army.

Serious games include all aspects of education – teaching, training, and informing – and at all ages

(Michael and Chen, 2006). They can be applied to a broad spectrum of application areas, such as: (1)

Page 24: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

9

public policy; (2) defence; (3) corporate management; (3) healthcare; (4)training; and (5) education

(Zyda, 2005).

Their obvious advantage stems from the fact that they allow learners to experience situations that are

impossible in the real world for reasons such as cost and time. (Corti, 2006; Klopfer et al., 2002). An

elementary school student raised the following question at the Game Developer’s Conference

(Moulder, 2004): “Why read about ancient Rome when I can build it?”. It engages the user in the

pedagogical journey and can have a positive impact on the players’ development of a number of

different skills: (1) analytical and spatial skills; (2) strategic skills; (3) insight learning and recollection

capabilities; (4) psychomotor skills; (5) visual selective attention; and so on (Mitchell and Savill-Smith,

2004).

2.3 Games on Sustainable development

Energy Wars can be included in the game’s category – Sustainable Development. Under this theme

there are several games, where the player can assume different roles, from world president to a

common citizen, In the Annex A - Serious Games on Sustainable Development (Katsaliaki and

Mustafee, 2012), presented an updated with serious games developed until now on sustainable

development. Regarding EW, there are two games that have similar game objectives.

World Without Oil (2008) – Player´s role: Citizens

“Imagine a progressively worsening of oil stock and describe what personal affect the

fictional crisis would have. Learn ecological values and issues of sustainability and

responsible citizenship and take real actions with the online community to preserve

earth's resources.”

Oligarch (2008) – Player´s role: CEO of Oil Company

“Explore and drill around the world and make profit by corrupting politicians, stopping

alternative energies and increasing the oil addiction so you are not fired by the

company's stakeholders.”

These games present related issues concerning oil depletion management, despite a distinct player’s

role, and awareness of the importance of a smooth transition towards a sustainable behaviour, in the

game World Without Oil. EW differentiates by having several models that simulate real life processes

such as (1) market speculation for oil price discovery (Sousa et al., 2012); risk analysis for energy

projects. Also emphasises what are the best proxies for the Oil Market: (1) GDP; (2) Population and (3)

Oil Price. Also, it makes it possible to learn about renewables energies, capable of substituting current

Page 25: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

10

fossil fuels resources. Therefore, EW can play an important role on SG market, providing a reference

tool to increase the awareness on sustainable development.

2.4 Gamification

The American politician Albert Arnold Gore (2011) said that: “Games are the new normal”. They are

becoming increasingly present in our day life. Games are not a solution for everything, although they

can be (very) useful. Designing a real life environment with some of the aspects that can only be found

in a game, is able to increase happiness and productivity (Werbach and Hunter, 2012). This method is

known as Gamification. The definition that is most widely accepted across the society, as described by

Deterding et al. (2011a) is “the use of game design elements in non-game contexts.” The word

Gamification, as pointed out by Fabian Groh (2012), while first being coined earlier in the 2000's, did

not gain recognition from a wider audience until late 2010.

Figure 2.3, shows the interpretation of Deterding et al. (2011b), which situates gamification,

contrasting against other related concepts via the two dimensions of playing/gaming and

parts/whole. Therefore, the quadrant that is related with play and a whole artefact or concept is called

a toy. Whereas, when play is linked to a not complete conception, i.e. a part, is named playful design.

It is about designing using the notion of play but not systematically structuring them with rules and

goals. On the top-left quadrant if something is a game and a whole concept is defined as games, or

serious games for the purpose of this work. On the top-right quadrant is the gameful design or the so

called gamification.

Page 26: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

11

Figure 2.3 - Separating the term gamification from SG (Deterding et al., 2011b)

Deterding et al.(2011a) are clear to point out the relation between games and to the more broad term

of play -. The difference in the two terms being that games are specialized systems that are

characterized by explicit rules and the attempt within those systems to achieve certain goals or

outcomes. While play, on the other hand, is a term that refers to a much broader and free form type

of a fun activity.

It is also valuable to examine what exactly is meant by the term element used in gamification. As Groh

(2012) states, in contrast to SG which are full-fledged systems, gamification refers to the use of only

specific elements of game systems. Kevin Werbach (2012) divide the elements into a pyramid of three

different types: (1) Dynamics; (2) Mechanics; (3) Components; see Figure 2.4. The Dynamic’s elements

(e.g. constrains, narrative, emotions, progress) are the most high level conceptual tools that make the

experience coherent and with regular patterns, which gives the implicit structure that provide the

framing for the game. Elements, when combined with the idea of Design are also referred to as game

mechanics.

Figure 2.4 - The Pyramid of Game Elements (Werbach and Hunter, 2012)

It is this idea of design that distinguishes game mechanics from the other elements of gaming such as

game technology and game practices (Deterding, et al., 2011). However, as Sicart (2008) shows, even

with that in mind, the meaning of the term Game Mechanics is not something that is necessarily

straightforward. Magne Gåsland (2011) defines a game mechanic as “An element of a game that is

made up of a set of rules and feedback loops used to incentivize the player.”

This definition does a great job of pointing out the incentive value of game mechanics. This also

underscores why Gamification is gaining popularity in the design of systems of work or tools for

learning (Delloite, 2013). Werbach and Hunter (2012) provide many examples of game components,

Page 27: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

12

which range from items, points, and levels, to appointment and bonuses. As made apparent by these

examples, game mechanics can refer to a vast range of elements found in many different games.

Although, the best example is not the one that uses more different game elements, is the one that

uses the elements the most effectively.

An important notion is that elements by themselves are not a game. The overall game’s experience is

built around them. The aspect that is not full captured by them is the aesthetics, like the visual and

sound experience. Only a design that combines a good use of games’ elements with an attractive

environment can be a successful product, where “the whole is greater than the sum of the parts”.

The key goal of all gamification is to encourage user-engagement, i.e. to motivate users to engage with

an application or service, usually by making it more fun to use (Deterding, 2011). Therefore, it is also

important to examine what it is, and what positive effects that increasing engagement can have.

O'Brien and Toms (2008), explained this idea by offering a definition of engagement as consisting of

the following users' activities: (1) attitudes; (2) goals; (3) mental models; and (4) motor skills. This

definition encompasses not only the physical aspects of a user’s interaction with a system, but the

mental aspects, as well. The same authors go on to explain how engagement manifests itself in the

form of attention, intrinsic interest, curiosity, and motivation. These motivation aspects are studied by

the Self-Determination Theory (SDT), see section 2.5.

2.5 Self-Determination Theory

Self-Determination Theory (SDT) is an approach to human motivation and personality that uses

traditional empirical methods, while employing an organismic meta-theory, that highlights the

importance of humans' evolved inner resources for personality development and behavioural self-

regulation (Brühlmann, 2013). In Figure 2.5 is presented a SDT’s structure adapted from the work of

Gagné and Deci (2005) on cognitive evaluation theory. This area concerns about the investigation of

people’s inherent growth tendencies and innate psychological needs that are the basis for their self-

motivation and personality integration. As well as for the conditions that foster those positive

processes. Inductively, using the empirical process, Ryan and Deci (2000) have identified three such

needs: (1) competence; (2) relatedness; (3) autonomy.

SDT divides human motivations into: (1) Amotivation; (2) extrinsic; and (3) intrinsic. Amotivation is a

state when a person is not interested and simple does not perceive any forms of interaction. External

motivations include more inner states, although the constant aspect is that a person is only motivated

by a reward that is received by performing an action. In this sense, reward can range from a prize

(something material) to an inner satisfaction. The inherent enjoyment that a person has in performing

Page 28: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

13

an action is called intrinsic motivation. In this case, a person can perform a task and at the time benefit

from it.

The goal of using gamification is to make an action or task seem more appealing. Gamification can

change what one would do, for an external reward or due to obligations, for something that gives

pleasure or that is simply fun to do it. Using the SDT definitions, gamification is a tool to transform

extrinsic motivations into intrinsic motivations.

Figure 2.5 - SDT: Amotivation, Extrinsic and Intrinsic motivations (Deci and Gagné, 2005)

Page 29: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and
Page 30: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

15

3 Energy Wars

The EW project is a Serious Game, see section 2.2, on sustainable development and natural resources

depletion using ABM. Along with entertainment purposes, this model pretends to simulate energy

companies’ behaviour on a fossil fuel scarcity scenario. Financial supported by the Portuguese Quadro

de Referência Estratégica Nacional (QREN), through the Agência de Inovação (AdI) with the project’s

reference: QREN-7929. This game is produced by Biodroid in collaboration with two universities: (1)

IST; (2) ESCS. The ESCS is responsible for game’s aesthetics, 3D elements and interface validation.

Biodroid is responsible for game producing, designing and graphical interface development. Energy

producing structures schemes and characters profiles are also Biodroid responsibility (Proj. Energy

Wars - Relatório n.o 3, 2013). The Serious side of the game is developed by IST, where three models

are integrated to better simulate real life aspects: (1) a macroeconomics’ model which describes the

interaction between oil price and the gross domestic product (GDP), the oil stocks resulting from the

mismatch between supply (provided by the energy sector) and demand dictated by households and

the productive sector consumptions; (2) an energy companies model which simulates investments

towards fossil fuels, renewable energy and game elements (e.g. structures, upgrades, units); (3) the

futures markets model which replicates oil papers’ transactions of different types of financial agents

on the secondary market (i.e. speculation) providing the oil price discovery (Proj. Energy Wars -

Relatório n.o 3, 2013). The aim is that the players get the perception of how the Oil&Gas (upstream)

industry behaves and become aware on both game’s topics – sustainable development and natural

resources depletion.

This chapter intends to present the game from the player’s point of view. After being introduced the

storyline, both game’s characters and components are explained. The objective is to understand the

game’s gameplay. Furthermore, the environment where the player is immersed and the information

that he should perceive to better support his decisions and the tools that the player has in order to

fulfil game´s objectives are described. In the end of the chapter a turn is expounded to ensure the

complete comprehension of game’s procedures.

3.1 EW Storyline

The game design document (GDD), provided by Duarte and Folhadela (2013) from Biodroid, describes

a detailed storyline and game’s concept. The EW’s genre is an Economic Turn Based Strategy (TBS)

game. The player´s role is an energy company chief executive officer (CEO), see Figure 3.1, whose focus

is the exploration and conquest of two energy carriers: Electricity and Oil. The dispute for the

remaining Oil on Earth will be the conflict’s epicentre. Due to its scarcity, companies will have to

Page 31: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

16

manage oil reserves wisely and progressively invest in renewable energy with the purpose of ensuring

company’s long-term wealth. With various opponents across the world, the ultimate goal is to control

global energy supply. Hiring different units, companies can perform special actions aiming to guarantee

sustainable and secure energy production, an update research and development (R&D) office or

unleash severe attacks on enemies’ lines.

Figure 3.1 – EW: CEO scheme (Duarte and Folhadela, 2013)

3.2 EW Gameplay

World four major companies, see section 3.5, begin the game in their respective region. Each company

can build facilities in different cities, which allows the chief executive officer (CEO) to hire units.

The company’s portfolio increases by buying fields and building structures to produce Oil and

Electricity. The only source of revenues is selling electricity or oil. When others regions become

available, companies are able to expand, build headquarters (HQ) abroad and dispute new fields with

host enemies, through auctions. After building a HQ in a new region, the player needs first to build

facilities in order to hire their respective units. These characters possess special abilities which allow

them to perform specific actions, such as: (1) defend and/or repair to guaranty portfolio security; (2)

upgrade structures to increase energy output, and consequently profits; (3) attack enemies; (4) spy to

steal technology and corporate data. In Figure 3.2, as it was described before, it is possible to see that

there are two different paths that the player can follow when considering his investments – Energy

and Non-Energy. The latter captures all sort of options Non-Energy related.

To win the game, the player must reach a victory condition that can be chosen by the player in the

beginning of the game (Duarte and Folhadela, 2013): (1) World Tycoon: reaching a net value of a

certain amount; (2) World Domination: having more than 50% of the lands; (3) Oligarch: getting the

Oligarch rank.

Page 32: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

17

Due to the game’s objectives, the player will only achieve the said victory conditions through Energy

investments, which allows him to increase companies’ portfolio and revenue to attain the wanted

winner tittle. Non-Energy options serve as supportive features which the player must use to

accomplish, several game´s achievements, and a sustainable growth with minimum concern against

any enemies’ action.

Being a TBS game, each player will play in turn. The player’s order is previously randomly established

in the beginning of each iteration. This is a pseudo-parallel feature to ensure that players do not have

an advantage over any other player.

Figure 3.2 - EW Gameplay

3.3 EW’s components

Biodroid provided game’s components to be implemented in the model (Duarte and Folhadela, 2013).

After careful consideration of the GDD, different clusters were created to group similar components:

(1) World; (2) Structures; (3) Companies; (4) Facilities; (5) Units, see Figure 3.3. This was made to

facilitate further the model’s implementation, see section 4, where these clusters are used to create

classes in the sense of OOP, see section 4.4.

The World comprises 7 regions, see Figure 3.3, where each one has 4 Cities. Therefore, 28 cities are

evenly distributed all over the world. In this sense, a city is an object which could simulate different

regions profiles on economic development and energy use. For a more detailed approach, instead of

regions, a city can simulate countries profiles as well. A total number of fields (t_fields) are distributed

on these regions. Each field will have a resource, see section 4.1, which companies are allowed to

exploit for profit. As was already mentioned, there are two different energy carries, Oil and Electricity.

Each one has its own producing structure, which are oil field and power plant, respectively. The former

refers only to the oil platform, both on and offshore. The remaining resources are produced with a

Page 33: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

18

power plant. In Structures class are presented all mentioned constructions. The class Companies

includes all companies’ information, see section 3.5.

Figure 3.3 – EW’s components

All infrastructures able to hire units were grouped in the class Facilities and units form the Units’ class.

The former can be built in every company’s HQ. As shows Figure 3.2 on the non-Energy branch, a unit

can only be hired after the respective facility is erected. Table 3.1 shows for each facility (e.g. embassy),

the unit that can be hired (e.g. diplomat) and the actions that this unit can perform (e.g. buy oil fields).

Table 3.1 – Units requirements and actions performed

Facility Unit Action

STO Mercenary Attack

Manufacturer Engineer Repair

Embassy Diplomat Buy Fields

Assault Guard Defend

Laboratory Scientist Research

STO Spy Steal Technology and Data

3.4 The Environment

The environment can be considered everything that is external to the player’s company. This follows

the same interpretation used by agent based modelling (ABM). The environment can have its own

identity and/or from an agent point of view represent also all other agents (Araújo, 2011).

Summarizing, the environment is everything external on which an agent can act on, learn from or be

Page 34: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

19

affected by.. The environment properties, in the model are both macroeconomics variables, which

companies (i.e. agents) will have to take into account during the decision process and opponents’ data

and interactions. In Figure 3.4 those properties are classified in four different classes: (1) Economy; (2)

Companies; (3) Regions; (4) Cities.

Figure 3.4 – Environment’s properties

Every company (friend or foe), apart from the player’s company, belong to Companies class. These

opponents can interfere on both forms of energies supplied, which affect the respective price, attack

player’s structures and through auctions, dispute new fields. These concessions are included in the

Regions class. After having a HQ and an available diplomat in a region, the player is able to see which

concessions are being released and participate in auctions, if more than one company is interested to

purchase the same concession.

The macroeconomic data is within the Economy class, such as GDP, interest rates and world

population. An exogenous model was developed by research fellows from IST to produce

macroeconomic data to provide inputs to the model developed here (Carvalho et al., 2013). It was

adopted the Brent crude oil for a global reference price. In recent years, Brent crude has become the

world’s most commonly referenced crude oil price benchmark and a large proportion of global physical

oil trade is priced at a differential to the Brent oil complex. It is estimated by price reporting agencies

and oil producers that approximately 60% of the world’s traded oil is priced off of the Brent complex

(ICE Crude & Refined Oil Products, 2014).

Page 35: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

20

The electricity related data is considered to be local, i.e. each city buys on its own price. Its information

is included in the Cities class. Electricity price and demand is also exogenous to the model. They are

simulated in a model using local economic and energetic performance indicators, e.g. GDP per capita

and energy intensity (Brito and Sousa, 2013).

3.5 A Company

In this work, companies are modelled as deliberative agents, see Section 4.6, making decisions

according with its own perception of the environment and current intentions. Following again an ABM

approach, a company is defined as a set of properties and a range of functions that it can perform.

Properties allows companies to differentiate each other, making it also possible to obtain distinct

traits, as suggested by Biodroid (Duarte, 2012a). Excluding buying fields and build HQ, see Figure 3.2,

all actions are performed by companies’ CEOs. In Figure 3.5 are presented all game’s companies and

respective CEOs.’ profile.

Figure 3.5 – Companies’ CEOs (Duarte, 2012a)

Several classes were developed, following the same process used on the environment, encapsulating

similar company’s data: (1) Fields; (2) Capital; (3) HQ; (4) Decision, see Figure 3.6.

In the Field’s class is concatenated all data related to fields’ status and energy production. When a field

becomes available is evaluated by each company established in same region and is classified as

Available. After a player successfully purchasing a concession, its status change to Inactive and

automatically becomes unavailable in the environment for the remaining opponents. A field only

acquires an Active condition when it has at least one producing structure built in. Moreover in the

same class is possible to perceive structures’ status. After each turn, every operating structure suffers

a depreciation on its health points (HP). As such, a dimensionless value, named turns to destruction

Page 36: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

21

(TD) was implemented to alert players to designate a repairing unit, i.e. an engineer, whenever the

player feels that a structure is threatened. Both production and reserves’ data can be found in the

Fields class as well. Every turn, a player can access installed production capacity evolution, production

output values from all resources and the sum of both energy carriers produced – Oil and Electricity. At

last, scarce resources have its historical reserves’ amount and a dimensionless variable which indicates

the number of turns to total depletion (TTD)

The latter can be related to an important value for every company from Oil&Gas industry which is the

ratio of reserves over production (R/P) (Gomes and Alves, 2011). The R/P ratio is the number of years

for which the current level of production of any energy and mineral can be sustained by its reserves

(Feygin and Satkin, 2004). Moreover, is an important proxy for company’s condition and has a certain

strategic significance. Companies try to keep the value R/P reasonably constant at approximately 10

years because if the ratio falls to a low value, it indicates that the company is in poor health condition

(Babusiaux, 2007).

Figure 3.6 - Companies properties

In the HQ class, a player can see which regions are currently available. It is possible to build an HQ on

each city and within it, build different facilities which allow him to hire its respective units, as Figure

3.2 illustrates. Units location, i.e. region’ name and city number, can be found in the same class for

better perspective over built constructions. Similar representation is presented for units. This way,

player can easily manage his assets. A unit can be either hired one at each turn or only after the

previous hiring is completed. There is a limit of units that a player can have available at each facility.

Page 37: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

22

When this limit is reached, the player is no longer able to produce more units unless any unit is

allocated. These rules were created to provide to game’s designer some degrees of freedom, in order

to facilitate the game’s balance.

3.6 A Game’s Turn

A turn begins with the player perceiving the changes in the environment, before making any decision,

updating his data from all classes, as described in the section 3.4. Afterwards, the player will evaluate

its current status within his ambience and execute a number of actions from the set of actions available

to him. All decisions planned, i.e. committed to, are stated under the company’s Decision class, see

Figure 3.6. Every action has an amount of turns to be completed.

If a concession is released in the present turn, the company will assess its net present value (NPV)

estimation. The result will serve to formulate a purchase cost. This procedure is described in chapter

5. Therefore, if the player decide to invest in the released concessions it will have to wait until all

players finish their turn. Moreover if at least one more opponent had intended to purchase the same

field, an auction will take place. The auction will have a deviate format of a first-price sealed bid, see

section 5.4. The company that makes the highest bid, wins the concession.

After had made all the investments, it is time for the company to update its status. All expenditures

are deducted in company’s current capital. Both Oil and Electricity produced are sold at the actual

respective price. Subsequently these revenues are add to company’s current capital. Field’s data is also

updated at this point, such as reserves (just for the fossil type), production and production capacity.

Page 38: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

23

Figure 3.7 – Game’s turn

Page 39: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and
Page 40: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

25

4 Model implementation

The software used for the model´s implementation was Matlab®. A high level language, which is

transposable to C++, a project´s condition. It was adopted an object orientated programming (OOP)

approach to guarantee a clear module structure and provide flexibility along the software

development (“Matlab - Object oriented programming,” 2012).

The platform that supports the energy model was built under the requirements of Biodroid’s lead game

designer Paulo Duarte (2012b), described in chapter 3. Several meetings took place to better

understand the company needs and explain the compromises between different possible solutions.

This procedure allowed the inclusion of all desired gameplay aspects. The objective was to balance real

processes and to minimize complexity to improve players’ comprehension and attractiveness. The

overall result allowed: (1) a better proximity between teams; (2) earlier perspective of game’s final

structure; (3) flexibility during model’s implementation.

In this chapter, is described the platform implemented to include all game’s aspects above mentioned.

First are discussed which energy resources could be deployed in order to sustain a scenario where

global energy supply is only provided by renewable electricity. A database was developed in

collaboration with a fellow research, containing the word’s potential installed capacity for renewable

technologies such as wind and solar in the world (Brito, 2012). Moreover, a cost analysis for the same

technologies was performed to capture their economic interest (Brito and Folgado, 2012).

Afterwards is expounded where action takes place – the World. Input matrices, see section 4.3, need

to be loaded to set up world’s configuration. These matrices serve to distribute resources in different

regions. In order to increase game’s realism were implemented similar values used to characterize

some important components such as oil reserves and both Oil and Electricity output from the

corresponding structures.

Further on is explained the OOP approach, see section 4.4. Classes, in the context of OOP, are derived

from game´s components. Classes’ properties were formulated as result of a research on both GDD

and energy related subjects to better understand which features were important to characterize each

object. To illustrate this procedure is an example of an oilfield object in Table 4.9.

Companies have a very important role in the game. As mentioned above, they are modelled as

deliberative agents. Its implementation is detailed in section 4.6. Different type of actions were formed

to conceive proceedings which allow players to analyse each decision. As a result, at each turn a

company is able to compute every possible action which can perform. Hereby it is possible to foreknow

the exact number of states which a company can undergo on the next turn.

Page 41: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

26

It is important to notice that Energy related features were developed with more detail as this work’s

main topic is to model Oil and Electricity supply. For this reason, these features will be described with

more detail further on. Specially the oil resource because the mode’s first aim was to develop an oil

supply model. However, throughout the concession it was realised that a platform that simulate the

exogenous inputs had to be built. This platform had to include both games’ aspects and inputs from

other models.

4.1 Energy Resources

The existent main resources for world energy supply are crude oil, coal and gas. The true size of fossil

fuel reserves are limited and will eventually be depleted. The dilemma that: “And when will non-

renewable energy be depleted?” is a fundamental question that needs to be addressed (Shafiee and

Topal, 2009). The EW storyline imagine a world in an oil scarcity scenario, which evolve to one where

global energy is provided only by renewable energy. Nowadays economy is heavily dependent on oil,

especially the transportation sector and individual drivers in particular are vulnerable to disruptions in

oil supply because other energy sources are not generally available to power their vehicles, e.g. the

250 million cars and trucks on the road in the USA. (Grove et al., 2008). However, Jacobson and

Delucchi (2011a, 2011b) conducted a detailed scenario analysis where all global energy is feasibly

provided by Wind, Water and Solar (WWS). Which they claim, is an alternative for the future.

Alternatives for the transport sector have been tested with the introduction of electrical vehicles

powered by renewable energy, in order to reduce oil dependency (Lund and Kempton, 2008).

The companies on EW can deliver two types of energy carriers: (1) oil; and (2) renewable electricity. In

the model, oil is the only finite natural resource. Its price is given by an agent based pricing model of

futures oil contracts, which simulates financial markets behaviour, mainly pretending to capture

trader’s speculation (Sousa et al., 2012). There are four different renewable electricity sources, see

Figure 4.1: (1) hydro; (2) Solar; (3) Wind; (4) Nuclear. Nuclear energy it is classified as renewable in the

model however its classification as such is controversial (Chowdhury, 2012). The nuclear resource

implementation was a request from Biodroid in opposition to the IST opinion. Game designers

considered necessary to have an energy type more desirable then others. In fact, nuclear has a

considerable higher output, see Table 4.7, and consequently a greater impact upon players’ opinion,

especially after the Fukushima’s incident (Poortinga and Aoyagi, 2013). Offshore exploration is harsh

and technological challenging. Between the employed resources, the ones with matured offshore

technology which can produce a significant energy output are oil and wind (Jacobson and Delucchi,

2011b). Is expected that most of Oil&Gas giant fields yet to be discovered are located offshore

(Robelius, 2007). The decision of implementing this sources in the game was the result of different

Page 42: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

27

meetings between the IST and Biodroid’ teams. The market analysis which provided the available

energy resources per region, was carried by Mário Brito (2012). Together, with the same author, a

state of art revision on existing renewable electricity and Oil&Gas extraction technologies was made

in order to supply the model with reasonable production capacities values and discriminate costs: (1)

CAPEX – Capital Expenditure; (2) OPEX – Operational Expenditure; (3) LCOE – Levelized Cost of Energy

(Brito and Folgado, 2012).

Figure 4.1 - Energy Resources

4.2 Initial conditions

To run this model is necessary to introduce some initial conditions. In the Table 4.1 is represented the

inputs that can be customized in order to modify some constrains and environmental conditions. Most

of this parameters where introduced to provide flexibility to game designers when was necessary to

balance the game’s values, such as the investment costs and max_actions. The latter is very powerful

because can limit companies’ number of options, to invest at a turn. Moreover, the inclusion of some

variables intend to provide the player with some decisions’ thresholds, such as the repair_hp_bellow

parameter. With this, is possible to establish automatically an order to repair a structure if its HP pass

through a certain percentage. The addition of this parameter is a consequence of structures’

depreciation along the time, as stated previously in section 3.5.

The most important inputs are both nruns and t_fields. The latter defines the amount of turns that the

game can have. In the case of the designers want to limit the game’s number of turns, it is possible

due to this variable, otherwise a number large enough should be employed. The t_fields is the foremost

critical because defines the number of fields available in the world, and consequently the absolute

amount of resources available to be exploited, either from a renewable source or a finite one. In the

section 4.3 is detailed described how is utilized the t_fields parameter. Furthermore, in the same

section more inputs’ matrixes are explained: (1) A, (2) D, (3) R, (4) O; see Figure 4.4. Although these

matrixes are in fact initial conditions, and, for their own relevance, were developed within an

independent section 4.3.

Page 43: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

28

Table 4.1 – Model’s initial conditions

Initial conditions Description

nruns Number of game’s turns

t_fields Total number of fields in the world

nuclear_fields Logical variable to exclude nuclear fields

start_reserves Initial reserves’ fields that companies start in the beginning

start_renewable Initial renewables’ fields that companies start in the beginning

start_producing Logical variable to start producing in the beginning

hire_after _end Logical variable. Company is allowed to hire a unit after the previous is done

max_actions If true, can define the maximum number of actions at a turn

repair_hp_bellow Threshold decision variable to order structures repairment

bbl_iprice Initial Oil price

bbl_ivar Initial Oil variance

electr_iprice Initial electricity price

electr_ivar Initial electricity variance

As mentioned above, the nuclear resource inclusion was controversial. Therefore, it was put into effect

a logical variable that prohibits the release of these fields, in spite of being implemented. Furthermore,

if either nuclear_fields is turned off or no nuclear field is attributed in the beginning of the game is as

if there were no nuclear resource, which also corroborates with IST’s team intentions.

Both start_reserves and start_renewable give the companies, the possibility to start with some fields

in their portfolio. The former is related with the fossil resource’s type illustrated in Figure 4.1 while the

latter with the renewables types. If a positive value is attributed to any of both variables, it is attributed

to the company the number of fields from the respective type, with uniform probability distribution of

the existent resources in each type. Moreover, it is possible to define in advance if the fields initially

attributed start producing since the beginning through the start_producing parameter.

The last four parameters in Table 4.1: (1) bbl_iprice, (2) bbl_ivar, (3) electr_iprice, (4) electr_ivar, intend

to simulate the inputs from the other models. Table 4.2 shows the initial values used to simulate the

energy prices.

Table 4.2 – Initial energy prices and monthly variations

bbl_iprice [$] bbl_ivar [$𝟐] electr_iprice [$] electr_ivar [$𝟐]

100 0.05 0.20 0.005

To supply the model with both oil and electricity prices, it was implemented a white noise process

(Kannan and Lakshmikantham, 2002) to reproduce, in an expeditious approach, these exogenous

Page 44: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

29

variables and also has the benefit to introduce some stochasticity. In Equation 4.1 is presented the

described process for the oil price.

𝑃𝑡𝑜𝑖𝑙 = 𝑃𝑡−1

𝑜𝑖𝑙 + 𝜀𝑁(0, 𝑏𝑏𝑙_𝑖𝑣𝑎𝑟𝑡) 4.1

The variable 𝜀 is a random variable with Normal distribution. It has a zero mean and a variance equal

to the parameter bbl_ivar ( 𝜇 = 0, 𝜎2 = 𝑏𝑏𝑙𝑖𝑣𝑎𝑟𝑡), which can change during the game progress.

Therefore, each time the model is run both prices follow a random path. In spite of its simplicity, this

implementation has the advantage of allowing to control oil prices fluctuation with just one variable.

For bbl_ivar values close to zero (𝑏𝑏𝑙𝑖𝑣𝑎𝑟𝑡 ~ 0) oil price remained stable long the time. If the values

were much higher than the mentioned above in Table 4.1, the price variation would be enormous and

cause oil supply shocks (Peersman and Van Robays, 2012).

Figure 4.2 - Oil price random path

As already stated in section 3.3 and 3.4, cities are objects that pretend to simulate different regions

profiles on economic development and energy use. Hence, it was used the work developed by Brito

and Sousa (2013) to supply the cities with the following data : (1) electricity prices; (2) GDP per capita;

(3) population; (4) electricity consumption per capita; and (5) energy intensity. Intensive variables,

such as GDP per capita and electricity consumption per capita, were transposed to the cities within the

same regions while the population was distributed evenly by the amount of cities within the region.

The game´s balance objective is to provide reasonable cost´s for all game’s components exhibit in

Figure 3.3. These values are settled according with how designers foresee the acquisition preferences

on each element. Moreover, using the component’s prices, it is possible to design a path from which

ones players will have access first, assuming that the player will have access to more capital along the

game and its non-satisfaction condition. Therefore, it was attributed symbolic values, in order to run

Page 45: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

30

the model, giving very lower prices to all components, when comparing to a field’s acquisition and

player initial capital.

4.3 World configuration

The space where action unfolds – World – was built to be as flexible as possible with few degrees of

freedom, to undertake any resource and rank combination. A tree diagram design was adopted to

establish different field’s ranking per resource for each region, see Figure 4.4 . The steps to configure

the world are: (1) define the total number of fields available in the world (t_fields); (2) split t_fields by

regions in proportion to their area (Ar), see Table 4.3, where 𝑟 is defined as the region’s index; (3) for

each region, distribute energy resources; (4) attribute a rank to each field; (5) for the resources

assumed to be explored offshore, see section 4.1, provide the percentage of offshore fields per region.

Table 4.3 - World area to split fields per regions

r REGION Area [Km2] Ar [%]

1 North America 24 709 000 18

2 S. & Cent. America 18 932 000 13

3 Europe 28 119 000 20

4 Middle East 5 255 000 04

5 Africa 30 222 000 21

6 Asia 25 399 800 18

7 Pacific 8 646 600 06

World 141 110 000 100

The data used to split the regions, corresponds to the (land) area fraction of each world’s region (A)

(MCCOLL, 2005). This option to divide the world is not precisely accurate because some of the lands

will be considered offshore afterwards. However the objective was to get a representative distribution,

from which Biodroid can tune to better serve their purposes. The decision to use seven different

regions was requested by Biodroid. IST’s team suggested six. This pronouncement is supported by

revised reports, provided by relevant references, which split the world in six economic regions (BP -

Statistical review of world energy, 2012). The compromise was settled dividing the Asia & Pacific into

different regions. This implementation in the model allowed the advantage of real data fitting such as

GDP and oil reserves. The number of fields per region (N) has to be an integer, its value is the rounded

product of t_fields and A, Equation 4.2.

𝑁𝑟 = 𝑟𝑜𝑢𝑛𝑑(𝑡_𝑓𝑖𝑒𝑙𝑑𝑠 × 𝐴𝑟) 4.2

Page 46: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

31

The resource on each region is obtained by using the resource distribution matrix (D), see Table 4.4.

The field type Empty was included, as a resource, to allow flexibility. Using an auxiliary matrix AN(r, j),

(j is the resource index) whose dimensions is 7x6 (region x resources) and each line r is a vector (1x6)

of values equal to Fr, see Equation 4.3. By applying an element wise multiplication between AN and D,

the matrix with the number of fields per resource on respective region (C) is obtained, Equation 4.4.

𝐴𝑁𝑟𝑗 = 𝑁𝑟 , ∀ 𝑗 4.3

𝐶𝑟𝑗 = 𝑟𝑜𝑢𝑛𝑑(𝐴𝑁 ∘ 𝐷)𝑟𝑗 4.4

Table 4.4 - Resource distribution

MATRIX D (R,J) OIL HYDRO SOLAR WIND NUCLEAR EMPTY

NORTH AMERICA 0.25 0.15 0.25 0.25 0.05 0.05

S. & CENT. AMERICA 0.25 0.15 0.25 0.25 0.05 0.05

EUROPE 0.25 0.15 0.25 0.25 0.05 0.05

MIDDLE EAST 0.25 0.15 0.25 0.25 0.05 0.05

AFRICA 0.25 0.15 0.25 0.25 0.05 0.05

ASIA 0.25 0.15 0.25 0.25 0.05 0.05

PACIFIC 0.25 0.15 0.25 0.25 0.05 0.05

The fields’ ranking dictates the number of structures that can be built on site. There are five levels: (1)

bronze (B); (2) silver (S); (3) gold (G); (4) platinum (P); and (5) diamond (D). Therefore, it is possible to

build one structure on a bronze field, and proportionally increasing the amount to a maximum of five

structures in a D field, see Figure 4.3. For the non-renewable resources, in this is case oil, the rank also

attributes the field’s reserves values. The values used for oil reserves, see Table 4.5, classify all

concessions as giant oil field, where reserves are higher than 0.5 billion barrels (Gb).

Page 47: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

32

Table 4.5 - Oil Reserves’ values

OIL [Gb] BRONZE SILVER GOLD PLATINUM DIAMOND

Reserves 6 12 18 24 30

Figure 4.3 - Fields' ranking and structures. Platinum Oil Rig (Biodroid - 3D art)

To use as reference, the biggest oil field – Gawar – from Saudi Arabia as an ultimate recoverable

reserve (URR) of 66-150 Gb (Robelius, 2007), which is the expected crude oil’s maximum extraction.

Although giant oil fields represent approximately 1% of the existent fields, they are responsible for

more than 50% of world production (Robelius, 2007). Only these fields are considered significant

discoveries, which allow for long term reserves forecasts and their decline rates influence world oil

production (Höök et al., 2009).

The field´s ranks are distributed using matrix Rjki, with 5x5x7 dimension (resource x rank x region),

where k is the rank index. In Table 4.6, there is the standard rank’s distribution for every region. Using

again an auxiliary matrix ACjki, with the same dimension as R, where

𝑨𝑪𝑗𝑘𝑟 = 𝑪𝑟𝑗, ∀ 𝑘 4.5

Table 4.6 - Rank distribution

Matrix Rr(j,k) Bronze Silver Gold Platinum Diamond

Oil 0.35 0.3 0.2 0.1 0.05

Hydro 0.35 0.3 0.2 0.1 0.05

Solar 0.35 0.3 0.2 0.1 0.05

Wind 0.35 0.3 0.2 0.1 0.05

Nuclear 0.35 0.3 0.2 0.1 0.05

Applying an element wise multiplication on AC and R, it is obtained the matrix F with the number of

fields per: (r) region; (j) resource; (k) rank.

𝐹𝑗𝑘𝑟 = 𝑟𝑜𝑢𝑛𝑑(𝑨𝑪 ∘ 𝑹𝑟)𝑗𝑘 4.6

Page 48: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

33

The auxiliary matrices, AN and AC, allow a vectorized implementation which in case of a worlds’

dimension escalation, the number of operation to initialize the game, regarding the number of regions

and fields, remains the same. This means that the performance is not affected by changing these initial

conditions. (Matrix F can also be introduced directly skipping Equation 4.2 to 4.6).

The resource distribution per regions, matrix D, and the respective field’s rank, matrix R, reproduce

the energy resource availability. The variable t_fields is very important because allows to scale fields’

quantity all over the world by only changing its value.

Along with the fields’ ranking requirement, structures must also have levels from which player can

upgrade up to three levels. The state of the art revision for the technologies used in the model (Brito

and Folgado, 2012), allowed to suggest energy production’s typical values, see Table 4.7. To be noted,

that depending on field’s rank, players can build one to five structures on an available spot, and

upgrade each structure up to level three.

The world’s tree implementation is characterised in the Figure 4.4, where are represented the matrices

responsible for each transition towards fields’ initialization. Along with the structures’ level, a field’s

state can be fully characterized by one of each different elements presented in Figure 4.4.

Page 49: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

34

Table 4.7 - Structures production level

Production level

Oil [Mbbl/month]

Hydro

[MW]

Solar

[MW]

Wind

[MW]

Nuclear

[MW]

I 1,5 10 10 10 250

II 3 50 50 50 500

III 6 100 100 100 750

Figure 4.4 - World tree diagram

Another requirement, was the existence of offshore concessions. As mentioned in section 4.1, only oil

and wind can be explored off land. Regarding the location’s aesthetics the only difference, relating

with the onshore ones, is the structures’ name and more important – investment costs. Typically

offshore installations have a CAPEX two to three times higher than onshore (Gomes and Alves, 2011;

Maples et al., 2013). A field is rated as Offshore with a probability according to its region r and resource

j (independently from its rank), using matrix O, see Table 4.8. A logical value 𝑜𝑙𝑟𝑗𝑘

is computed to

classify each field l (field index), obtained in matrix F, using equation 4.7, where 𝑢𝑛𝑖𝑓(0,1) returns a

random number between 0 and 1 with uniform distribution. This equation gives a (random) value with

a certain percentage of “o” being negative. Therefore, a TRUE value is attributed to variable o, meaning

that the field is located offshore.

During the game, fields are released along the time. Preferentially, fields with lower ranks are released

first. However, regarding Oil&Gas, this implementation is not consistent with the reality. Giant fields

(>500, 000 URR) had priority and were firstly explored due to its economic interest (Robelius, 2007),

which are comparable in the model with the highest fields’ ranks. Considerable reserves located

onshore are becoming very expensive and technological defiant to achieve, which explains the

increasing frequency of the offshore giant fields being discovered and exploited (Oil&Gas Giant Fields,

Page 50: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

35

2011). Although, in terms of game flow, this implementation is better for the player’s motivation to

feel that is progressing and gaining access to better fields (Deterding, 2011).

Table 4.8 - Offshore matrix

Matrix O (r,j) Oil Hydro Solar Wind Nuclear Empty

North America 0.1 0 0 0.1 0 0.1

S. & cent. America 0.1 0 0 0.1 0 0.1

Europe 0.1 0 0 0.1 0 0.1

Middle east 0.1 0 0 0.1 0 0.1

Africa 0.1 0 0 0.1 0 0.1

Asia 0.1 0 0 0.1 0 0.1

Pacific 0.1 0 0 0.1 0 0.1

𝑜𝑙

𝑟𝑗𝑘= {

1, 𝑢𝑛𝑖𝑓(0,1) − 𝑂(𝑟, 𝑗) ≤ 00, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

, ∀ 𝑘 4.7

The control of the fields’ release process is done by four variables: (1) initial period that any field is

released – stunlock; (2) mean frequency which a field be released – pull_field; (3) maximum number

of fields released at a turn – fields_number; and (4) the overlapping parameter which allows to release

higher ranks’ fields, compared with the lower existing ones – overlap. Regarding the field’s resource,

it was used a uniformly probability distribution, which means the resource is completely random.

Initially there is defined a period, through the variable stunlock, which no field is released. Usually, In

the beginning, designers need to walk the player thought the game, thus in this rounds few things

should happen (Zicherman and Cunningham, 2011). Once finished the initial period, fields finally start

to be released. Afterwards, the parameter pull_field keeps under control the frequency of fields

released. Similarly of what was done to characterised offshore fields, a random variable with normal

distribution is obtained. Consequently, if the random variable sign is positive, then the field is released,

see Equation 4.8.

𝑝𝑢𝑙𝑙_𝑓𝑖𝑒𝑙𝑑 = {

1, 𝑁(0.2 , 0.5) ≥ 00, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

4.8

Using the values in the Equation 4.8 (𝜇 = 0.2 , σ2 = 0.5), fields are expected to be released every 2/3

turns, as requested by the game designers. Furthermore, if pull_field is positive then fields_number is

used to obtain the number of fields to be freed. A random integer between 1 and fields_number is

computed, with uniform probability, to decide the amount of fields for companies to purchase at a

turn. Finally the overlap parameter depends on the number of lower rank fields available. As less low

ranks exist, higher is the probability of higher ranks fields to be released.

Page 51: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

36

4.4 OOP: Classes and properties

OOP is an approach to software development in which the structure is based on objects interacting

with each other to accomplish a task. A class describes a set of objects with common characteristics.

Objects are specific instances of classes and are composed of properties and methods. The latter serve

as operations (functions) that only objects of that class can perform with the objective to achieve said

tasks (Clark, 2013). The values attributed to object’s properties is what differentiate them, among the

same class.

One of the mains characteristics of OOP is the Inheritance. At the top of the hierarchy are the – super-

classes. From these, dependent classes can be defined – subclasses –which inherit all properties and

methods of the super-classes and express only aspects that are exclusive to their particular purposes.

The advantages of these approach are: (1) avoiding duplicating code; (2) add or change subclasses at

any time without modifying the super-classes or affecting other subclasses; (3) if a super-class changes,

then all subclasses automatically adopt these changes (“Matlab - Object oriented programming,”

2012).

Following the OOP framework, the super-classes implemented were derived from the provided game’s

components, see Figure 3.3. The ones that group similar classes and justified that designation are: (1)

units; (2) facilities; (3) fields. The latter super-class has the following subclasses: (1) oil field; (2)

powerplant. Field’s hierarchy is illustrated in Figure 4.5.

Figure 4.5 – OOP: Fields’ hierarchy

Page 52: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

37

The subclass Powerplant has preference as the only exclusive property. The structure powerplant is

the one responsible for producing Electricity. This energy carrier can only be sold locally. Therefore, it

only delivers its output to a city within the same field’s region. Each city acts as demands points and

buy at its own price. Hereby, preference is a vector with the same size as the number of cities in the

region, which intends to differentiate each city, apart from its price. This feature can captures effects

such as risk from political instability, distance between produced and deliver site and environmental

hazards. Consequently this value is used to find which city a powerplant should connect. A utility

number is obtained multiplying both preference and city’s electricity price.

In Table 4.9 is discriminated all oil field’s properties. The property name is unique for each object,

which by itself is sufficient to identify and differentiate any object from every class. The properties

marked with an asterisk (*), e.g. reserves, are specific for the oil field subclass. In the model, this

resource is the only that is scarce, so these properties intend to characterize its current availability.

The Equation 4.9, demonstrates that field’s reserves is dependent on the Oil initial in place (oiip) and

the recovery factor (rf).

𝑟𝑒𝑠𝑒𝑟𝑣𝑒𝑠 = 𝑜𝑖𝑖𝑝 × 𝑟𝑓 4.9

The oiip is the amount of reserves contained on the source rock. Its calculation depends on field’s

geophysics properties (Dake, 1983). The rf is the estimated percentage of extractable resource

conditional upon to economic interest and technological viability. In this case reserves are the, so called

in literature, stocked tank barrels (STB), i.e., the available resource at surface conditions which can be

stored and sold (Gomes and Alves, 2011). This implementation allows to increase the field’s reserves

at any time just by rising rf, which could be reasonable by a technological breakthrough.

A field’s production is also dependent on the sum of the installed production capacity (prodcap) on

each structure (s), from the total fields’ set (FS) built (and not destroyed) on site.

𝑝𝑟𝑜𝑑𝑢𝑐𝑡𝑖𝑜𝑛 = ∑ 𝑠𝑐𝑓𝑠 × 𝑝𝑟𝑜𝑑𝑐𝑎𝑝𝑠

𝑠∈𝐹𝑆

4.10

Where scf is the spare capacity factor, i.e., the prodcap’s output percentage. Therefore, as shows in

Equation 4.10, each structure s has its own scf and prodcap. This feature allows, for instance, to

reproduce the Organization of Petroleum Exporting Countries (OPEC) companies feature whom not

produce at maximum capacity (World Oil Outlook, 2013) to be able to influence oil price and

monopolise the market as a cartel (Wirl, 2012).

Page 53: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

38

Table 4.9 - Oil field’s properties

Properties Description

name Fields’ name

company Owner name (free if still available)

region Region to which it belongs

locked Logical variable. (If True is unavailable for companies)

auction Auction status

source Type of resource

shore Onshore or Offshore

rank Fields’ rank

production Fields’ monthly production (from all structures)

prodcap Fields’ monthly production capacity (from all structures)

structure Fields’ structures

rpath Fields’ location data

cost Fields’ initial cost

time_unlocked Time it became available

oiip * Oil initial in place

rf * Fields’ recovery factor (% oiip)

reserves * Fields’ reserves available for extraction

4.5 Decision clusters

During the game, companies have several actions at their disposal to perform. Additionally, all actions

have constrains which have to be verified in order for the player become able to execute his intentions.

After analysing the GDD (Duarte and Folhadela, 2013), were identified actions sharing the same profile.

Therefore decision clusters were formed. As a result of some regions are not initially accessible,

permissions have to be granted on site for each cluster. In Table 4.10 there is an example of a

company’s decision cluster matrix at the beginning of the game. Matrix’s entries are logical variables.

In this illustration, the company commences its campaign in region 3 (Build HQ == 1) and is only allowed

to build facilities (Build Facilities == 1). Additional type of actions become available when the player

accomplish the steps described in both Figure 3.2 and Table 3.1. For instance, to unlock Buy Lands first

the player has to build an Embassy to unlock Hire units and then hire a diplomat to finally be able to

purchase new concessions.

For every region where companies are already installed, i.e. that have at least one HQ, every

investment option is procured within each decision cluster released, see Figure 4.6. As mentioned

above, this implementation allows to know the exact amount of states to which the company can

Page 54: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

39

evolve at every turn, see both Equations 4.11 and 4.12. The inclusion of this procedure proved to be

advantageous to the model. To know the complete list of actions at every turn, made it possible to be

a model that can be played.

Table 4.10 - Decision cluster’s matrix

Decision clusters Region

1 2 3 4 5 6 7

Build HQ 0 0 1 0 0 0 0

Buy lands 0 0 0 0 0 0 0

Build Structures 0 0 0 0 0 0 0

Upgrade Structures 0 0 0 0 0 0 0

Build Facilities 0 0 1 0 0 0 0

Hire units 0 0 0 0 0 0 0

Attack 0 0 0 0 0 0 0

Repair 0 0 0 0 0 0 0

Move units 0 0 0 0 0 0 0

Research 0 0 0 0 0 0 0

Energy Non-Energy Both

As stated above, when a decision cluster is released within a certain region, companies compile a list

of its feasible actions. Let 𝐴𝐿𝑖𝑡 be the action’s list (AL) at each turn t for company i. Where t and i are

the time/turn and companies index, respectively. Additionally, let dal be the actions’ list dimension,

Equation 4.11.

𝑑𝑎𝑙𝑖𝑡 = dim (𝐴𝐿𝑖

𝑡) 4.11

The amount of states that can evolve at a turn t is exponential with the actions’ list dimension, see

Equation 4.12.

𝑛𝑠𝑖𝑡 = 2𝑑𝑎𝑙𝑖

𝑡 4.12

Where 𝑛𝑠𝑖𝑡 represents the number of states to which the company i can evolve to at t.

As the game progresses, the number of actions at a turn tend to increase, see Equation 4.12. This

increase is specially related with the number of regions where the company is operating. Throughout

the model’s implementation it was noticed that sometimes players have to evaluate more than 20

investment options. This means more than 220 possible states to evolve to. Furthermore, this great

amount of hypotheses requires an enormous computational power. Let ml be the memory limit

Page 55: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

40

threshold for the amount of options that companies can process, all together, at a turn. Figure 4.6

illustrates the two different methods to procure the investments options when 𝑚𝑙 = 20: (1)

Aggregated and (2) Discretized.

Figure 4.6 - Available actions' implementation (ml = 20)

If 𝑑𝑎𝑙𝑖𝑡 ≤ 𝑚𝑙 companies are able to handle all options at a turn in an aggregate mode. Whenever a

company has to deliberate on more than a certain ml actions (𝑑𝑎𝑙𝑖𝑡 > 𝑚𝑙) it ceases to see the entire

list as a whole. Instead of forming a unique AL, it creates a list for each cluster released in the decision

cluster matrix. In this discretized mode, each AL is considered a decision slot, because each one (𝑟 𝐴𝐿𝑖𝑡

𝑎𝑠 )

is analysed independently, where 𝑎 is the actions type, s is the slot index and r is the region index.

Although this implementation allows infinite investments options, the number of slots per regions, and

per cluster, should not be higher than 1, i.e. 𝑠 ≤ 1. Otherwise, if s is higher than the unity, the game

becomes very exhausting for the player because it has so many options to evaluate and eventually the

player loses interest due to its complexity (Zicherman and Cunningham, 2011).

To be able to analyse and compare which is the best set of investments to make, see Figure 4.7, several

characteristics had to be assigned. Consequently, every possible action as its own properties. Although

clusters pretend to group similar properties, some appear across the different types (e.g. region,

requirements, and method). Moreover, others have to be present in every type, such as the property

cost. Special consideration was given when it was necessary to name each action for the player be able

to promptly understand what each action can perform.

In Table 4.11 is an example of an investment’s properties belonging to the Buy Lands cluster. Just by

analysing the name it is possible to perceive that is a field which belongs to Europe, its resource is

Hydro and the rank is Bronze. The property dip_city indicates the number of diplomats available to

perform this purchase and their current location. Prerequisites indicates either the cluster or constrains

Page 56: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

41

which needs to be verified to perform a said action. Method are the features released by this action,

within the region. The cost is the value which the company is willing to offer for this concession, see

section 5.3. The time_tb is the necessary amount of turns to settle the transaction or generally, to

accomplish any action. Along with each AL a vector containing the actions’ costs vector is produced to

support the player on his decisions.

Table 4.11 - Action’s properties. Buy Land’s example

Properties Description

name EU_O_B_3

company Free

region Europe

dip_avail 2

cost $ 8.35 × 109

time_tb 3

prerequisites Diplomat

action Buy Lands

method Build Structures

Figure 4.7 - Deliberate on cluster’s options

Due to the order of magnitude of the states which the companies could evolve to it was natural the

necessity of introducing some sort of filters to exclude some actions or impossible combinations to

narrow down the options. Furthermore, this tool also brings flexibility to game designers if they decide

to introduce some last modifications or facilitate the game balance. Primarily, were left out all

combinations where the summed actions’ costs were higher than the company’s capital available.

Throughout the model’s development it was noticed that the Build HQ cluster added several

investment options by releasing the Build Facilities cluster and, subsequently, the corresponding

facilities actions. To compensate for these effects it was introduced other filter that only allowed

Page 57: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

42

companies to have one HQ under construction. Additionally, a player can only move to another region

after having built HQ in all cities where is already installed. Afterwards a company could only move to

a new region from the available set.

To organize the company’s agenda, due to the actions’ time lag, the investments undertook were

classified into three different categories: (1) Planned; (2) Pending; and (3) Executed. Both Planned and

Executed are arranged within matrixes where lines correspond to time and columns to actions number,

Figure 4.8 a). The Pending actions are structured in a matrix with the same number of columns as the

number of decisions clusters and each row is the actions’ pending index, see Figure 4.8 b).

Furthermore, is through the pending type that enables to detect when more than one company intend

to purchase the same field, which leads to an auction, see section 5.4. At a turn t, whatever options is

taken, it gets into the Planned matrix to the next available position in the line t. Moreover the same

action is placed in the Execute matrix at t plus actions’ time_tb. While it does not reach the actions’

completion, a reference in the Pending matrix is made under the column of the respective cluster, for

the player gets a better perspective of the actions’ pipeline. This implementation also allows for the

player to re-planning some actions before their execution.

Figure 4.8 - Actions planning implementations for a) planned and executed status and b) pending status

4.6 Deliberative Agents

In this work companies are modelled following an ABM approach. According to Farmer and Foley

(2009), when compared with other methods, such as econometrics forecasts or dynamic stochastic

general equilibrium, ABM seems to be a better way. Agent based simulation is a recent method to

modelling systems composed of autonomous and interacting agents. This methodology is a way to

model the dynamics of complex and adaptive systems. Such systems, often self-organize themselves

and create emergent order. Furthermore, ABM also include models of behaviour (human or otherwise)

and are used to observe the collective effects of individual agent actions and interactions. The

development of agent modelling tools, the availability of micro-data, and advances in computation

have made possible a growing number of agent-based applications across a variety of domains and

disciplines (Macal and North, 2010).

Page 58: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

43

There is no universally accepted definition of the term agent, and indeed there is much ongoing debate

and controversy on this very subject. Essentially, while there is a general consensus that autonomy is

central to the notion of agency, there is little agreement beyond this (Meyer, 2014; Wooldridge, 2002).

The first consensual agent’s definition is presented by Wooldridge and Jennings (1995), although a

most recent and refined designation (following the same line of thought) is offered by Norvig and

Russell (2010). The latter authors said that agents are expected to: (1) operate autonomously; (2)

perceive their environment; (3) persist over a prolonged time period; (4) adapt to change; and (5)

create and pursue goals. A rational agent is one that acts so as to achieve the best outcome or, when

there is uncertainty, the best expected outcome. In this sense, the term rational is adapted from game

theory, which means that individuals/agents are assumed to act in their own self-interest (Romp,

1997).

Traditionally, plan-based agents that include generative planning, as opposed to utilizing precompiled

plans or a reactive behaviour, would generate a complete plan to reach a specific fixed goal, then

execute the plan. If plan execution monitoring is available, the agent would re-plan from scratch when

the plan becomes invalid. Agents following this characteristics are designed as Deliberative agents.

Due to the time requirements for generating complete plans, the plan may be invalid by the time it is

executed. This is because the world may change substantially during plan generation (Rens, 2010).

Therefore, BDI architectures take a different approach.

BDI theory is based on the philosophy of practical reasoning (Bratman, 1987). It offers flexibility in

planning by reasoning over different goals. Hence, an agent based on BDI theory can adapt to changing

situations by focusing on the pursuit of the most appropriate goal at the time. Typically, a proper plan

to achieve an adopted goal is selected from a data base of plans. However, a plan that is generated

with the agent’s current knowledge for guidance, usually is the more appropriate. BDI agents can also

make rational decisions as to when to re-plan if a plan becomes invalid, reducing the amount of re-

planning, thus increasing the agent’s reactivity. The main components of the model for BDI agent

architectures are: (1) beliefs, (2) desires, (3) intentions and (4) plans, see Figure 4.9. Additionally, more

complex architectures may include procedures for commitment to and reconsideration of intentions.

As described in the section 3.4, the environment is everything that is external to the company. Its

properties are illustrated in the Figure 3.4. Rao and Georgeff (1995) say that beliefs are the informative

component of a system state. A company perceives the information from the environment and

updates its states. Once more the properties that the companies update are presented in the Figure

3.6. In the model, companies evaluated if there is a new fields to be purchased and observe both oil

and electricity prices at a turn. In the Annex B - Main script’s source code is represented the main

script’s source code, where implementation can be observed.

Page 59: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

44

Figure 4.9 - BDI agent's architecture (Bratman, 1987)

The formation of intentions is the purpose of deliberation. Options generation and filtering of goals

are one of the deliberations main responsibility (Wooldridge, 2000). In the previous section 4.5 is

explained how all options are perceived across the decision’s clusters and the filters are implemented.

Figure 4.9 is a diagram representing the model algorithm, where is possible to observe both update

beliefs and options processes. Afterwards the next process that agents do is planning.

Practical reasoning can be divided into deciding: (1) what to do and (2) determining how to do it

(Bratman, 1987). Wooldridge (2002) entitles these processes: (1) deliberation and (2) means-ends

reasoning. In the context of practical reasoning, deliberation means deciding on goals to pursue –

objectives – and means-ends reasoning means determining plans to achieve those goals – planning.

Hence, an objective is a reference to a desire state. A plan to be a structure of actions and rules for

support the decision making. Desires are a subset of objectives that an agent would ideally like to

achieve, according to its current beliefs. Desires need not be mutually consistent nor consistent with

the agent’s beliefs. Also, desiring a state puts no demand on the agent to settle on some means to

achieve the state (Bratman, 1987). In the model an agent’s desire could be an obvious things such as

to win the game or other particular ones, for instance: (1) explore or evolve everything and (2) Destroy

all opponents.

In the general case, desires can be inconsistent with one another, while goals require to be somehow

consistent. In other words, goals are chosen desires of the agent that are consistent. Moreover, the

Page 60: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

45

agent should believe that the goal is achievable. This prevents the agent from adopting goals that are

believed to be unachievable. This is one of the distinguishing properties of goals as opposed to desires

(Rao and Georgeff, 1997). This is called the property of realism (Ma et al., 2011). Regarding this model,

player should have goals such as: (1) increase revenues, (2) increase renewable production, (3) build

up reserves. As shows Figure 4.9, these are consistent and realistic.

An agent deliberates to choose a subset of desires, which are then its set of goals. While it deliberates,

it knows that it will select a subset of these goals to seriously pursue. An intention is a goal that has

been selected (committed to) according to some policy, strategy or value judgment. Intentions provide

control in the BDI model in that they allow the agent to be reasonable or effective by balancing

deliberation and action: An agent should commit to a course of action at some point, and then devote

resources to achieving the course of action. For instance, if a company commit to the prior example —

increase revenues — it starts to prioritize tasks in order to complete such intention. Initially, the

company should know what the sources of revenue are in order to come up with a plan. In this model

the only source of revenue is to sell either energy carrier. Thereafter, a sequence of actions should be

planned to achieve the objective – increase revenues. To pursue this objective, the player should follow

investment options based In Figure 3.2 on the Energy branch: (1) buy fields, (2) build structures and

(3) update structures, to increase production capacity. Following this chain of procedures, eventually

companies will achieve the desired objective. After planning, companies should perceive, among the

investment options, the actions that satisfy its intentions and schedule them, as illustrated in Figure

4.8.

In general, using a BDI architecture, an agent can reason over several goals, although a deliberative

agent lacks some flexibility by not being able to generate, by himself, suitable plans on demand.

Therefore, when this model was firstly designed it was aimed to integrate partially observable Markov

Decision Process (POMDP). Combining POMDP into a BDI architecture it was meant to combine the

benefits of the architecture with the ability to generate plans. In POMDP actions have non

deterministic results as in fully observable Markov Decision Process (MDP). In other words, the effect

of some chosen action is somewhat unpredictable, yet may be predicted with a probability of

occurrence. However, in POMDPs, the world is not directly observable: some data are observable and

the agent infers how likely it is that the state of the world is in some specific state. The agent thus

believes to some degree—for each possible state—that it is in that state, but it is never certain exactly

which state it is in. For instance, in the oil market, there is the expected demand, which companies

have to decide in advance how much oil they should supply, taking into account what is the behaviour

of all other companies. An MDP model with the following elements: (1) finite set of states of the world,

(2) a finite set of action, actions include those that the agent can choose to execute and those that are

Page 61: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

46

the nondeterministic outcomes of the chosen action, (3) transition state function, (4) reward/cost

function which gives the expected immediate reward/cost gained by the agent for reaching the new

state and (5) an initial state (Russell and Norvig, 2010) . For this reason it is procure all investment

options and is possible to foreknow the amount of states that a company can evolve to, see section

4.5. Afterwards, when both the amount of transition states and respective rewards/costs are known,

it is possible to compute an optimal policy (OP), based on a maximization of an expected utility

(Puterman, 2005). This OP is a series that indicates the optimal decision at each turn, i.e. the best

strategy (Bäuerle and Rieder, 2011). Each policy implies a respective transitions matrix, which can

represent different attitudes, e.g. attack or defence modes. Throughout the project it was realized that

such a complex artificial intelligence (AI) was not necessary, from this model, and consequently further

developments regarding MDP were not performed because Biodroid became responsible for game’s

AI development.

As explained above, the AI was not developed in this model. One of the main model’s outcome was to

provide all investment options in order to support on the decision making. As complex as AI may be, it

is only necessary to choose between the options available, in order to add it to the model. Once

companies have all investment options, as presented in section 4.5, they are allowed to do everything

possible to increase the number of tests for each action executed. Consequently, the inclusion of this

hybrid POMDP-BDI implementation, even though incomplete, proved to be advantageous to the

model. The fact that the model supply, at each turn, a list of all actions that a player can choose from,

makes it playable by a group of 4 players (same number as the amount of companies) without any AI

involved. When selecting any action, a player is able to see all properties, as the ones presented in

Table 4.11.

Figure 4.10 represents a diagram of the main script source code, see Annex B - Main script’s source

code. It is possible to observe that it has a structure of a BDI agent. At first, the model initialize by

reading the initial conditions, see section 4.2. Afterwards builds the game components: (1) Configures

the world, (2) creates companies and (3) constructs the environment. Thereafter, at each turn, is

randomly assigned players’ playing order. Companies start their course of actions by perceiving the

changes in the environment, see Figure 3.4, and update company’s beliefs, which are the new available

fields and both oil and electricity prices. Afterwards it procure all investment options at that turn, see

section 4.5. In the model companies invest on every possible action. Subsequently, these actions are

scheduled in the Planned matrix’s status. Afterwards, all actions assigned in the Execute matrix are

executed at the present turn. Each action undergoes the following procedure, when being executed:

(1) identify the action cluster that it belongs; (2) find an available unit to perform the action; (3)

randomly attributes a unit and execute the action; (4) updates company properties, discounts the

Page 62: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

47

actions costs and subtracts the used unit; and (5) if it is the case, releases a decision cluster or a feature.

The last operations to be done in the companies’ cycle are: (1) to receive do the payments; (2) update

the reserves values and (3) update the aggregate production. Thereafter, if more than one company

decides to purchase the same field, an auction will occur, see section 5.4. The last operation is to verify

if any victory condition was achieved. If any company achieves such condition the game ends and that

company is declared the winner. If it does not happen, the game continues until the maximum number

of turns is reached.

Figure 4.10 – Model’s algorithm diagram

Page 63: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

48

5 Decision Process

The energy related aspects were the most developed throughout the model. Although the AI was

Biodroid’s responsibility, additionally features were implemented to support the energy related

decisions. The methodology used for projects’ evaluation and risk analysis is similar to those used in

the real world, especially the ones concerning the natural resource field’s evaluation. In the model, the

only source of revenues comes from both oil and electricity sold into the market. Therefore the only

way to increase the revenues is to purchase more fields and upgrade structures, see Figure 3.2.

Biodroid wanted that the fields’ acquisition were made through auctions, see section 5.4, in order to

increase competition between companies. This Biodroid’s requirement is in line with the reality.

Auctions are a common procedure for the host countries to optimise the exploitation rights to be sold

(Hendricks et al., 1993). Consequently, companies had to be able to access what was the field’s

economic interest.

An evaluation model was developed to enable companies to estimate the concession’s economic

potential, as in Pergler and Rasmussen (2014). Figure 5.1 illustrates the model features for an oil’s

concession. The objective was that companies could compute a bidding value for the available fields.

Furthermore, this model allows companies to forecast both energy carriers’ prices and interest rates,

see section 5.1. With this information, it is possible to achieve a concession’s net present value (NPV).

Moreover, companies are able to manage the investment risk, which is an important decision tool.

Additionally, it can become a useful feature because allows to differentiate companies’ by means of

risk aversion.

When a field becomes available to be acquired, a company can decide if proceeds for the field’s

evaluation or not. A field can only be bought if it has been evaluated. A company makes this decision,

based on the information detained at the moment, which is the Markov property (Bäuerle and Rieder,

2011). Companies know beforehand: (1) the number of opponents within the same region; (2) current

energy’s prices; and (3) fields’ properties, see Table 4.9. Once a company’s decide to proceed with the

evaluation, stochastic differential equations (SDE) methods, such as Geometric Brownian Motion

(GMB) and Mean Reversion Models (MRM), are used to forecast both energy carriers’ prices and

interest rates, see section 5.1. Historical time’s series data are used to calibrate the model. Afterwards,

following a Monte Carlo (MC) approach, these models are used to obtain a pre-determined number of

random walks (Whitt, 2002), defined as n_sim, to simulate both prices and interest rates and

subsequently perceive a wide range of scenarios . Thereafter, with these results, it is possible to attain

the revenues to compute the respective n_sim NPVs, see section 5.2. Along, for the cost parameters

to calculate the NPV, see Table 5.2, was used the information from the database developed, together

Page 64: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

49

with Brito (2012). This database contains both CAPEX and OPEX for the respective technologies

necessary to exploit the fields’ resource. A sufficient large simulations number allows to make a Normal

distribution fitting (NDF) on the NPVs values obtained, see section 5.3. Typically a thousand simulation

are made in each model (𝑛𝑠𝑖𝑚 = 1000). After applying the NDF a company as a good educated guess

of how much a fields worth and decide how much such invest, regarding its own risk aversion.

Figure 5.1 - Oil Concession's evaluation model.

5.1 Energy Prices and Interest Rates Forecasting

The first task to be performed in the concession’s evaluation model is to forecast both energy’s prices

and interest rates, see Figure 5.1. Theoretical models of commodities price behaviour are reviewed in

(Deaton and Laroque, 1992). Both authors developed the rational expectations models of price

formation for commodities and show that the commodity price belongs to one of two regimes: (1)

where demand is equal to the current supply and inventory; and (2) where demand exceeds current

supply. In the long run, the price oscillates between these regimes (Meade, 2010). Although

inventories are not implemented in this work, in the short term, inventory levels have a short term in

the oil prices (Pindyck, 2004). The use of the inventory data has been used for short term (i.e. up to

three month ahead) forecasting by Ye et al. (2006).

Page 65: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

50

Looking specifically at oil price behaviour, the literature has two main approaches for the model

development. One modelling philosophy is dictated by the arbitrage pricing theory, where the

motivation is to provide a pricing framework for a derivative or futures, see for example Schwartz

(1997). Moreover, the same author proposed that the stochastic differential equation (SDE) for

continuous time models, include: (1) geometric Brownian motion (GBM); and (2) mean reverting

models (MRM). An alternative theory philosophy is data driven where a model is chosen from a

universe of models such as the autoregressive integrated moving average (ARIMA) framework

according to a goodness of fit procedure (Meade, 2010). The former approach was employed in the

model. Therefore it was implemented both a GBM and a MRM to forecast either energy prices’ or

interest rates. To calibrate the model it was used Brent prices time series (BP - Statistical review of

world energy, 2012). As stated above, Brent prices were chosen because they represent two thirds of

the oil commercialized in the market (ICE Crude & Refined Oil Products, 2014).

Among all the energy commodities, electricity poses the biggest challenge for researchers and

practitioners to model its price behaviours. A distinguishing characteristic of electricity is that it cannot

be stored or inventoried economically once generated. Moreover, electricity supply and demand in a

bulk electric power network has to be balanced continuously in order to prevent the network from

collapsing. Since the supply and demand shocks cannot be smoothed by inventories, electricity spot

prices are volatile (Deng, 2000). Furthermore, Deng (2000) also suggest that a GBM is inadequate to

model electricity prices and proposes a combined mean-reverting process with a single jump process.

To calibrate the electricity price’s model, it was used the residential and industrial average end-user

(after tax) prices modelled by Brito (2013). Brito analysed leading countries, within the concerted

regions, such as the United States for the North America region and extrapolate the results to other

countries using GDP/Capita and Energy Intensity. For every city, within a given region, it was attributed

the respective electricity prices. Hence, a renewable field’s evaluation uses the electricity prices from

its own region.

In the energy business, where most of the companies’ investments have long term returns

(Osmundsen et al., 2005), the real interest rate is not the preferable parameter to be used as a discount

rate. However, this approach would be more appropriate if companies invest only using borrowed

money. Another advantage is that real interest rates have plenty of data available to calibrate the

models. Ideally, the best parameter to be used as a discounted rate is the weighted average cost of

capital (WACC), see section 5.2. The latter, strongly depends on companies’ financial data, which is not

always disclosed nor transparent for most companies, especially the national oil companies (Promoting

Revenue Transparency: Report on Oil and Gas companies, 2011).

Page 66: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

51

According to economic theory it is plausible that interest rates are (in the long run) mean reverting

(End, 2013; Rebonato, 1996; Smith, 2010), i.e. that they revert to a long-term equilibrium level as time

goes by. This level can be based either on fundamentals (relative mean reversion) or on an unspecified

mean value (absolute mean reversion). Interest rates that are relative mean reverting reflect per capita

economic growth, which is driven by technical progress in the long run. The real interest rate has a

stable relationship with per capita economic growth according to growth theories (Barro and Sala-i-

Martin, 2003), and empirical research has indeed established a stable relationship between the real

interest rate and economic growth (Lopez and Reyes, 2009). The nominal interest rate is also

determined by inflation, which is volatile due to exogenous shocks in the economy, or due to monetary

and fiscal policy measures. The Fisher equation tells us that inflation influences nominal rates but does

not influence the real interest rate (Bigman and Taya, 2002). Therefore, it is more likely that real

interest rates stay close to their equilibrium value than that nominal interest rates do (End, 2013). The

interest rate data used to calibrate the model came from the Reserve Bank of Australia (Interest Rates

and Yields - Money Market - Monthly, 2014).

There is not any empirical evidence, of a model proved to be better than other to forecast either

commodity prices or real interest rates (Meade, 2010; Willingham, 2012). Consequently, the decision

of which model should be used for each parameter is based on the literature revision discussed above.

Once a forecast model is attributed to either energy prices or interest rates, a sufficient large random

scenarios are sampled. Afterwards, a useful descriptive statistics can be calculated (Dupacova et al.,

2003). There is no unambiguous definition of sufficient large, however, a number of simulations

becomes reasonably accurate (i.e. sufficient large) when its statistical properties becomes

approximately asymptotic (Verbeek, 2004). This technique is known as a Monte Carlo (MC) simulation.

The MC approach has the benefits that the accuracy of the density forecasted is far more informative

than the accuracy of a forecasted point or a prediction interval (Meade, 2010). Each scenario is a set

of both price and interest rate’s simulations. A simulation is a result of the random walks set from the

last known value, where the number of random walks performed is defined as n_sim. The number of

values that are pretended to be forecasted, from the last data known (i.e. the current month) is defined

as nv_forcast. Therefore, each random walk will evolve from the current month to nv_forcast months

ahead. In the case of the oil fields, nv_forcast is the amount of turns that a field is expected to last,

defined as 𝑀. Since there are different production levels, see Table 4.7, nv_forcast is calculated by

dividing the field’s reserves by the average production available, i.e. production level II. The renewable

resources’ are infinite, therefore to evaluate a concession should be discounting a perpetuity cash flow

(Brealey and Myers, 2012). However to simplify the implementation, i.e. to not have different discount

formulas, a sufficient large nv_forcast was selected for the effect on the NPV be less than 1%, see

Page 67: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

52

section 5.2. Therefore, when used to discount oil fields nv_forcast is equal to 𝑀, while on renewable

fields is fixed to 100.

Both models need data to be calibrated. As stated above each turn represents a month. One of the

inputs is the Initial Date, which represents the first, i.e. old, data retrieve to from the database to

calibrate the models. This parameter can be of great significance because if a most recent Initial Date

is chosen, it can suppress the influence of long age data that was affected by special events, such as

wars, e.g. World War I (1914-1918), Six-day War (1967) and recently the Iraq’s conflict (2003).

Moreover, oil embargos can also cause considerable supply shocks or even disruptions, such as the

Suez Crisis (1956) and UN Iraq embargo (1990) (Yergin, 2011). Consequently, these incidents have

great impact on energy prices resulting on significant effects on countries’ macroeconomics (Barsky

and Kilian, 2004). For every evaluation, each model does a thousand simulations (𝑛_𝑠𝑖𝑚 = 1000), to

perceive the scenarios’ statistical properties stabilization. The inputs necessary to run the models are

in Table 5.1.

Table 5.1 – Inputs for the forecast models

n_sim NV_FORCAST Model Initial Date Historical Data

OIL 1000 𝑀 GBM Jan -1991 (BP - Statistical review of world

energy, 2012)

ELECTRICITY 1000 100 MRM Jan - 1991 (Brito and Sousa, 2013)

INTEREST

RATES 1000 (𝑀, 100) MRM Jan - 1991

(Interest Rates and Yields -

Money Market - Monthly, 2014)

The model used for simulating the oil prices is a GBM. From the data, the statistical properties

computed to be introduced into the model are both mean (𝜇(t)) and standard deviation (σ)

(Econometrics Toolbox Guide, 2012). The discrete-time equation of this model can be written as in

Equation 5.1 (Glasserman, 2004; Shreve, 2004),

dX𝑡 = 𝜇(𝑡)𝑋𝑡𝑑𝑡 + 𝐷(𝑡, 𝑋𝑡)𝑉(𝑡)𝑑𝑊𝑡 5.1

Where: (X𝑡) is the state vector of process variables; (𝜇(𝑡)) generalized expected price matrix;

(𝐷(𝑡, 𝑋𝑡)) diagonal matrix, where each element along the main diagonal is the corresponding element

of the state vector 𝑋𝑡; (𝑉(𝑡)) is an instantaneous volatility rate matrix; and (𝑑𝑊𝑡) Brownian motion

vector.

Figure 5.2 illustrates a Brent oil prices forecasting using a MC simulation. As mentioned above the

benefits of the MC approach is the information provided by the forecasted density. In Figure 5.2,

random walks start from Feb-2013 (inclusive). It is possible to perceive a clear trend for the oil price to

Page 68: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

53

increase. Also is observed a higher density between the 100 $ and 200 $ interval. Therefore is possible

to deduce that crude oil Brent prices should remain high, above 100 $, with a clear tendency to increase

(Annual Energy Outlook, 2014). The GBM model experience some overshooting prices’ random walks,

which could be explained by data calibration relative to the Iraq War (2003) and the start of last

economic crises (2008).

Figure 5.2 – MC simulation of Brent crude oil prices

The model that serve both electricity price and interest rate is a MRM. From the data, is computed: (1)

the mean reversion speed or the rate of mean reversion, defined as 𝑆(𝑡), (2) the mean reversion levels

𝐿(𝑡) and (3) the instantaneous volatility rate 𝑉(𝑡) (Econometrics Toolbox Guide, 2012). This model

creates an Ornstein-Uhlenbeck mean reverting drift, also known as the Vasicek (1977) process. An

Ornstein-Uhlenbeck model is a special case of a Hull-White-Vasicek (HWV) model with constant

volatility (Hull and White, 1996). The HWV constructor is used to setup an SDE model with the

parameters estimated above. The discrete-time equation of this model can be written as in Equation

5.2 (Glasserman, 2004; Shreve, 2004).

dX𝑡 = 𝑆(𝑡)[𝐿(𝑡) − 𝑋𝑡]𝑑𝑡 + 𝑉(𝑡)𝑑𝑊𝑡 5.2

Where: (X𝑡) is the state vector of process’s variables (i.e. electricity price and interest rates and (𝑑𝑊𝑡)

stands for the Brownian motion.

Figure 5.3 illustrates North America residential and industrial average end-user (after tax) prices. It is

clear a decreasing trend of the electricity prices in the following two decades, which is in line with the

results of Brito (2013). Is observed a forecasted density between the 9 US₵ and 12 US₵ interval. This

result is in consonance with the last Annual Energy Report (Annual Energy Outlook, 2014) from the

Page 69: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

54

Energy Information Agency (EIA). The EIA report forecast that residential prices stabilize around the 9

US₵ and the industrial price will secure around 12 US₵. The average prices, including residential,

commercial industrial and transportation, will stabilize around 11 US₵. Due to the MRM mean

reverting characteristic, the electricity prices random walks, see Figure 5.3 are much better behaved

when compared with the oil prices, see Figure 5.2.

Figure 5.3 - MC simulation of North America Residential and Industrial average end user electricity prices

It can be observed in Figure 5.4 an annual average of the simulated real interest rates.

Figure 5.4 – MC annual average of the real interest rates simulation

Although each iteration represents a month in the model, long term investments such as these are

analysed in a year basis. Therefore, the NPV computed to perform the fields’ evaluation is in a year

Page 70: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

55

basis, see section 5.2. Companies financial accountability is also made in a year basis, see for instance

British Petroleum (BP) financial statements (BP Annual Report and Form 20-F: Financial Statements,

2013). It is perceived the mean reverting property of the MRM model. The interest rate tend to

oscillate around 2%, which is in consonance with the last report from the International Monetary Fund

(World Economic Outlook: Recovery Strengthens, Remains Uneven, 2014).

5.2 Field’s economics

The process of evaluating specific investment decisions is called capital budgeting. Here the term

capital refers to operating assets used in production, while a budget is a plan that details projected

cash flows during some future period. Thus, the capital budget is an outline of planned investments in

operating assets, and capital budgeting is the whole process of analysing projects and deciding which

ones to include in the capital budget (Brealey and Myers, 2012). Both types of energy resources

explored: (1) fossil and (2) renewable, have intrinsic business model differences. Petroleum

exploration projects are more capital intensive while renewable investment have infinite and free

resources. Although most of the energy carriers belong to the renewable type, as mentioned above,

oil was the most researched and developed resource.

Before proceeding with a project’s evaluation is necessary to have as much information possible, in

order to make a conscious decision. Project’s data can be divided into four different classes: (1)

Projects, (2) Economic, (3) Corporate Finance, (4) Fiscal/Tax (James, 2009). Projects data refers to the

fields’ characteristics, for instance, the hydrocarbons in place estimates. Corporate Finance class

contains all company information, while both Economic and Fiscal/Tax characterize project’s

environment. Four key economic metrics are used to rank projects and to decide whether or not they

should be accepted for inclusion in the capital budget: (1) discounted payback (DP), (2) NPV, (3)

internal rate of return (IRR), (4) profitability index (PI) (Brealey and Myers, 2012). The payback period

is defined as the expected number of years required to recover the original investment. However this

parameter does not discount the project’s cost of capital. Therefore, a discounted payback is used,

which refers to the number of years required to recover the investment from discounted net cash

flows. The IRR is defined as the discount rate that equates the present value of a project’s expected

cash inflows to the present value of the project’s costs. To compute these decision parameters is

necessary a discounted cash flow model, see Figure 5.5.

Before any actual exploration take place any permission from the resource owner must be granted. In

general, the resource owner is the government in the host country (Tweedie, 2003). Allocation

systems are grouped into two categories: (1) open door systems, where exploration and production

Page 71: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

56

(E&P) rights are allocated as a result of negotiation between the government and interested investors

through solicited or unsolicited expression of interest; and (2) licensing rounds (Tordo et al., 2010).

Figure 5.5 - Discounted Cash Flow Model (Brealey and Myers, 2012)

Licensing is the general term for describing the process of granting exploration permission. The license

should dictate the conditions and responsibilities of the resource owner and explorer, such as license

area, dividing of financial benefits and ownership of the discovered oil and/or gas. Two types of

licensing rounds can be identified: (1) administrative procedures, in which E&P rights are allocated

through an administrative adjudication process on the basis of a set of criteria defined by the

government, also known as beauty contests; and (2) auctions, in which rights go to the highest bidder

(Tordo et al., 2010). The latter was the one implemented in the model, see section5.4. Each resource

owner has its own selection criteria but some of the following is usually included: (1) extent of work

programme (i.e. seismic and number of wells drilled); (2) earlier performance and nationality (Tweedie,

2003). When the license is secured, it is time to start the exploration process, which is described below.

The stages of a typical Oil&Gas project cycle are: (1) licensing; (2) exploration; (3) appraisal; (4)

development; (5) production; and (6) abandonment (Gomes and Alves, 2011). These phases are

illustrated in Figure 5.6.

After acquiring the rights, the oil company carries out geological and geophysical surveys such as

seismic surveys and core borings. The data so acquired are processed and interpreted and, if a play

appears promising, exploratory drilling is carried out. If hydrocarbons are discovered, further

Page 72: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

57

delineation wells are drilled to establish the amount of recoverable oil, production mechanism, and

structure type. Development planning and feasibility studies are performed, and the preliminary

development plan is used to estimate the development costs.

Figure 5.6 - Production profile for an oil field (Davies, 2001)

If the appraisal wells are favourable and the decision is made to proceed, then the next stage of

development planning commences using site-specific geotechnical and environmental data. Once the

design plan has been selected and approved, contractors are invited to bid for tender. Normally, after

approval of the environmental impact assessment by the relevant government entity, development

drilling is carried out and the necessary production and transportation facilities are built. This is known

as the built-up phase. Once the wells are completed and the facilities are commissioned, plateau

production level is reached and a steady starts (Tordo, 2007). Maintenance must be carried out

periodically to ensure the continued productivity of the wells. Furthermore, when the reservoir

pressure is so low that the production rates are not economical, or when the proportions of gas or

water in the production stream are too high, secondary or enhanced oil recovery (EOR) methods may

be used. Secondary recovery consists of injecting an external fluid, such as water or gas, into the

reservoir through injection wells located in rock that has fluid communication with production wells.

The purpose of secondary recovery is to maintain reservoir pressure and to displace hydrocarbons

toward the wellbore. EOR involves the use of sophisticated techniques that alter the original properties

of the oil. Moreover, EOR can begin after a secondary recovery process or at any time during the

productive life of an oil reservoir. Its purpose is not only to restore formation pressure, but also to

improve oil displacement or fluid flow in the reservoir (Gomes and Alves, 2011). At the end of the

useful life of the field, which for most structures occurs when the production cost of the facility is equal

to the production revenue, the so called economic limit, a decision is made to abandon. Planning for

Page 73: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

58

abandonment generally begins one or two years prior to the planned date of decommissioning, or

earlier, depending on the complexity of the operation (Tordo et al., 2010).

For a typical production profile, see Figure 5.6, the correspondent expected nominal net cash flow is

represented in Figure 5.7.

Figure 5.7 - Typical Upstream O&G Project Nominal Net Cash Flow (James, 2009)

In Figure 5.7, it is possible to perceive some economic metrics: (1) maximum exposure; (2) payback;

and (3) economic limit. During the first four stages of the projects cycle, licencing to development, is

where are concentrated the negative cash flows. Initially due to the necessary explorations wells and

afterwards for the structures necessary to retrieve and transport the natural resources. The maximum

exposure is reach during the development, or built-up phase. The payback occurs during the plateau,

see Figure 5.6. During the plateau the production is constant and consequently the net cash flow

behaviour depends highly on the expected price forecasted. The net cash flow starts to reduce after

the plateau, when the production is already decreasing. To compensate the pressure declining,

investments in both secondary and EOR methods are made, which explains the decrease in the net

cash flow. With the pressure diminishing, eventually the cash flow will no longer be positive and the

projects’ economic limit is reached. Thereafter, occurs the field’s abandonment. During this phase, is

necessary to dismantle all structures, retrieve all well’s cases and reduce project’s environmental

impact. These mandatory operations, explains the (negative) last cash flow.

States haves sovereign jurisdiction over their natural resources and a responsible for maintaining a

legal regime for regulating petroleum operations. Various legal regimes have been developed to

address the rights and obligations of host governments and private investors. These are usually

classified into two main categories: (1) Concessions, also called licenses or tax/royalty’s systems; and

Page 74: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

59

(2) contracts. The latter is divided in two different types: (1) production sharing contracts (PSC); and

(2) service agreements (SA). Some fiscal regimes have combinations of the ones discussed previously,

and are defined as Hybrid (Barma et al., 2012). Figure 5.8 represents both the petroleum fiscal system

hierarchy and the respective distribution all over the world.

Figure 5.8 - Types and distribution of world petroleum fiscal systems (Barma et al., 2012; Johnston, 1994)

The fiscal system applied in the model was the concessions type. Nowadays is the fiscal system most

used, between Oil&Gas companies and the host governments. Also has a clearer fiscal system that is

comprised of both corporate taxes and royalties. Royalties are the agreed percentage of the

hydrocarbon sale’s proceeds and can be paid in cash or in barrels. The taxable income under a

concessionary agreement may be taxed at the country’s basic corporate tax rate (Tordo, 2007). A

concession grants an oil company the exclusive right to explore for and produce hydrocarbons within

a specific license area for a given period. The company assumes all risks and costs associated with the

project’s cycle within the licenced area. Under a concession, the ownership of petroleum in situ

remains with the state, until and unless petroleum is produced and reaches the surface, at which point

it passes to the investor. The investor is not exposed to changes in its reserves and production

entitlements when the oil price changes. Title to and ownership of equipment and installation

permanently affixed to the ground and/or destined for the E&P of hydrocarbons generally passes to

the state at the expiry or termination of the concession (whichever is earlier), and the investor is

typically responsible for abandonment and site restoration (Tordo et al., 2010).

In the model, a discounted cash flow process was built to calculate economic metrics to support the

decision making, see Table 5.2. Moreover, elements from the fiscal system type adopted – concession

– were also include, royalties and corporate taxes.

The forecasted prices and interest rates, see section 5.1, were computed in a monthly period, the same

as a game’s turn. Consequently, a year average had to be applied to both in order to fit the data in the

discount cash flow process. The year averages of price and discount rate correspond to 𝑝𝑦 and𝑟𝑦,

respectively.

Page 75: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

60

Table 5.2 – Discount cash flow model

Financial variables Year 0 Yr 𝒚 Units

Oil production 𝒒𝒚 Mbbl

Oil price 𝒑𝒚 $/bbl

SALES REVENUE 𝒓𝒆𝒗𝒚 MM$

Transport Costs

𝒕𝒄𝒚 MM$

OPEX Production Costs 𝒑𝒄𝒚 MM$

Royalty 𝒓𝒐𝒚𝒚 %

Depreciation 𝒅𝒆𝒑𝒚 %

OPERATIONAL EXPENDITURE 𝒐𝒑𝒆𝒙𝒚 MM$

TAX Corporate Tax 𝒕𝒂𝒙𝒚 %

OPERATING PROFIT BEFORE TAX 𝒑𝒓𝒐𝒇𝒊𝒕_𝒃𝒕𝒚 MM$

CAPEX Capital Expenditure 𝒄𝒂𝒑𝒆𝒙 MM$

UNDISCOUNTED NET CASH FLOW 𝒄𝒇𝒚 MM$

Discount rate 𝒓𝒚 %

Cash Flow Present Value (NPV) MM$

Cumulative Cash Flow MM$

Net Present Value 𝐍𝐏𝐕𝒑𝒊 MM$

Internal Rate of Return 𝑰𝑹𝑹𝒑𝒊 %

Discounted Payback 𝑫𝑷𝒑𝒊 Years

Profitability Index 𝐏𝐈𝒑𝒊 %

Costs

Economic metrics

Biodroid requested that field’s should have constant production just after a structure is built.

Therefore, in the case of oil field, instead of typical production profile, see Figure 5.6, it was used the

productions levels for the respective resource 𝑞𝑗, see Table 4.7, 𝑗 is the resource’s index. To calculate

the capex, it was used the region 𝑟 resource’s specific capital cost, defined as 𝑟𝑐𝑐𝑗,𝑟, from the database

built together with Brito (2012), which is multiplied by the average productions’ levels 𝑞𝑗̅̅ ̅̅ (i.e. level II),

see Equation 5.3. The opex cost considered were: (1) transport 𝑡𝑐𝑦 ; (2) production 𝑝𝑐𝑦; (3)

Royalty 𝑟𝑜𝑦𝑦; and (4) depreciation 𝑑𝑒𝑝𝑦. Transport costs are the ones necessary to move the oil to the

nearest pipeline or port. In the renewables case, are the necessary infrastructures to connect

production site to one of the cities within the same region. Biodroid wanted to include pipeline

construction and grid connection costs (Duarte, 2012a), which are then assigned in the game’s balance.

Page 76: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

61

Production costs 𝑝𝑐𝑦 are the operation and maintenance (O&M) from Brito (2012). The world average

royalty 𝑟𝑜𝑦𝑦 paid by companies to governments is 7% (Tordo et al., 2010), which was the one assigned

for the oil fields. Renewables fields do not have royalty’s costs. The world average corporate taxation

is approximately 35%, which was also the value assigned to 𝑡𝑎𝑥𝑦. The capex’s depreciation cost started

to be deducted after production begins at rate of 5% which is the world average for the Oil&Gas

industry (value also used in the renewables). Although it was calibrated a simplified options where the

field is paid up front, which is in line with the GDD (Duarte and Folhadela, 2013). Table 5.3 contains all

the formulas necessary to compute the economic metrics. Indexes 𝑖 and 𝑝 correspond to the company

and project being evaluated, respectively. The discount payback 𝐷𝑃𝑝𝑖 corresponds to the first year that

the cumulative cash flow is positive.

Table 5.3 - Financial parameters' formulas

Parameter Formula Equation

capex 𝑟𝑐𝑐𝑗,𝑟 × 𝑞𝑗̅̅ ̅ 5.3

𝑟𝑒𝑣𝑦 𝑞𝑦 × 𝑝𝑦𝑖 5.4

𝑜𝑝𝑒𝑥𝑦 (𝑟𝑒𝑣𝑡)𝑟𝑜𝑦𝑦𝑟 − 𝑡𝑐𝑦 − 𝑝𝑐𝑦 5.5

𝑝𝑟𝑜𝑓𝑖𝑡_𝑏𝑡𝑦 𝑟𝑒𝑣𝑦 − 𝑜𝑝𝑒𝑥𝑦 5.6

𝑐𝑓𝑦 (𝑝𝑟𝑜𝑓𝑖𝑡_𝑏𝑡𝑦)(1 − 𝑡𝑎𝑥𝑦𝑟) 5.7

NPV𝑝𝑖 − 𝑐𝑎𝑝𝑒𝑥 + ∑

𝑐𝑓𝑦

(1 + 𝑟𝑦𝑖)

𝑦

𝑌

𝑦=0

5.8

PI𝑝𝑖

NPV𝑝𝑖

𝑐𝑎𝑝𝑒𝑥 5.9

𝐼𝑅𝑅𝑝𝑖 ∑

cf𝑦

(1 + 𝐼𝑅𝑅𝑝𝑖 )

𝑦

𝑛

𝑡=0

= 0 5.10

Ideally, the discount rate 𝑟𝑡𝑖 used in the NPV calculation, see Table 5.2, should be the weighted average

cost of capital (WACC). The WACC is one of the key metrics in corporate finance (Brealey and Myers,

2012). It is widely used to appraise investment decisions and value businesses. All major financial

decisions require the determination of a WACC to discount future cash flows and compute either

project’s NPV or the firm’s value. It has also become critical to the elaboration of financial statements

through the notion of an investment fair value (Bancel et al., 2013). The WACC is a weighted average

of two very different magnitudes: (1) the cost of debt and (2) the required return to equity (𝐾𝑒).

Page 77: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

62

Although, the latter is called many times cost of equity, there is a difference between a cost and a

required return (Fernández, 2011). Equation 5.11 shows how to calculate the after tax WACC.

WACC𝑡 =

𝐸𝑡 𝐾𝑒𝑡 + 𝐾𝑑𝑡(1 − 𝑇)

𝐸𝑡−1 + 𝐷𝑡−1 5.11

Where: (𝐾𝑑) is the required return to debt, (𝐸𝑡) value of equity, (𝑇) is the effective tax rate.

Consequently, the valuation is an iterative process, where the free cash flows are discounted at the

WACC to calculate the company’s value (D+E). However, in order to obtain the WACC, we need to

know the company’s value (𝐷𝑡−1 + 𝐸𝑡−1) (Fernández, 2011). The correct calculation of the WACC rests

on a correct valuation of the tax shields. The value of tax shields (VTS) defines the increase in the

company’s value as a result of the tax saving obtained by the payment of interest. The VTS depends

on the company’s debt policy. When the debt level is fixed, the tax shields should be discounted at the

required return to debt (Fernández, 2011). Although, WACC depends on several parameters and

companies’ financial policies, indicative values for real pre-tax WACC are between 8% and 12%

(Indicative values of WACC, 2011). As any interest rate, inflation also separates nominal from the real

WACC (Rafferty et al., 2012). Independent institutes have made WACC estimations for electricity

generation business (Methodology Report – input assumptions and modelling, 2012, Weighted

average cost of capital: Incorporating a return on capital in the 2013 electricity determination, 2012).

Figure 5.9 demonstrates the discount rate impact on the project’s cumulative net cash flow.

Figure 5.9 - Discount rate impact on cumulative net cash flow. (James, 2009)

The discount cash flow model is applied for the n_sim scenarios obtained from the MC method.

Thereafter, is computed n_sim values for each economic metrics, resulting in vectors with size equal

to n_sim, see Table 5.2.

Page 78: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

63

5.3 Risk Management

The risk profile of the project changes during its life cycle. All Oil&Gas projects realise numerous

processes, ranging from undertaking geological surveys and identifying hydrocarbon resources, to

commercially exploiting them, which involve different levels and types of risks and uncertainty. These

can be broadly categorized as: (1)Geological — related to the likelihood that oil and/or gas are

present in a particular location, and to the range of potential discoveries; (2) Financial— related to

project and economic variables; and (3) Political — specific to each region or country. In general terms,

the geological risk begins to diminish after a discovery, while the political and financial risks intensify

(Tordo, 2007). One of the reasons for this is that the bargaining power and relative strength of the

investors’ and the host government’s positions shift during the cycle of petroleum exploration and

development. By the time production commences, capital investment on licensing and exploration is

a sunk cost, and facilities installed in foreign countries represent a source of vulnerability to the

investor (Tordo, 2007). In model is developed a tool that intends to support the financial risk analysis.

Both geological and political risks are outside of the work’s scope.

The method commonly used in the Oil&Gas industry to deal with risk and uncertainty is a sensitivity

analysis on the key parameters selected to be evaluated. A change from a base case of each case

parameter is performed to evaluate the impact on the project’s base case NPV. The main limitation of

this technique is that when changing a variable it assumes ceteris paribus, when it reality this is not

likely to be the case (Smith et al., 2013). This sensitivity analysis is also called spider diagram, see Figure

5.10.

In this section it is proposed a robust model, more appropriate for natural resources, as in Pergler and

Rasmussen (2014). The energy industry is a very capital intensive and frequently with a very long lead

time between initial expenditure and resulting revenue and profitability (James, 2009). Furthermore,

global market and economic conditions, including the expected level and trend of future oil and

electricity prices, also play an important role in shaping investors’ strategies and attitude toward risk.

In such a harsh environment, where companies have less capital available, exploration and exploitation

costs are increasing, the competitions for funds for alternative projects can be substantial. Therefore,

decisions have to be made carefully. Companies should be supported by tools that allow companies to

estimates: (1) future projects cash flows; (2) relative projects’ ranking in comparison with other

alternative investment options; (3) estimates risks, both financial and technical, in undertaking the

project; and (4) forecast the effect of the project on the overall company position (James, 2009).

Page 79: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

64

Figure 5.10 – Spider diagram (James, 2009)

The first point was already address in section 5.2, through the discount cash flow process. The tool

developed assist on both (2) and (3) items. The last task (4) was not implemented, however several

tools were developed (e.g. company current capital, owned reserves) that can address the effect of a

project in the company’s condition.

In section 5.2, the result of the discount cash flow model supplied with n_sim simulation of both prices

and interest rates resulted in a set n_sim values of four economic metric vectors: (1) NPV; (2) PI; (3)

DP; and (4) IRR. The NPV is the economic metric mostly used in the decision process. However, virtually

all should be analysed and support capital budgeting decisions (Brealey and Myers, 2012). DP provide

an indication of both the risk and the liquidity of a project. NPV is important because it gives a direct

measure of the dollar benefit of the project to shareholders. Therefore, we regard NPV as the best

single measure of profitability. IRR also measures profitability, but here it is expressed as a percentage

rate of return, which many decision makers prefer. Further, IRR contains information concerning a

project’s safety margin. The PI measures profitability relative to the cost of a project. Like the IRR, it

gives an indication of the project’s risk, because a high PI means that cash flows could fall quite a bit

and the project would still be profitable (Brealey and Myers, 2012). James (2009) suggested that a

positive field development investment decision requires at all estimated reserves level, price scenarios

and cost sensitivities: (1) a positive and maximised NPV; (2) a IRR in excess of the hurdle discount rate;

(3) acceptable maximum exposure; (4) acceptable DP; and (5) sufficiently high returns by comparison

with alternative investment opportunities. Although this considerations are vague, it gives the

perception what is important for a field’s evaluation from petroleum economist point of view.

Page 80: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

65

A normal distribution fitting is applied on the NPV vector. This process was only applied for the NPV,

although it can be performed to any of the economic metrics. Due the high number of simulated

scenarios (𝑛_𝑠𝑖𝑚 = 1000) is possible to extract significant statistical properties from normal

distribution, see Figure 5.11.

Figure 5.11 - NPV normal distribution fitting

A good indicative for the n_sim value is the kurtosis observed in the fitting. By increasing the number

of scenarios simulated, if kurtosis remains high (close to 3) and becomes approximately asymptotic is

because n_sim is already sufficient large (Verbeek, 2004). A high n_sim and a normal fitting with low

kurtosis (fat tails) indicates that risks are elevated because both forecasted prices and interest are

volatility (high standard deviation). A long right tail indicate a considerable amount of outliers. The

reason is the influence of the oil price simulations. Due to the oil historical prices, affected for instance

by Iraq War (2003) and the financial crises in 2008, simulated random paths tend easily to increase

drastically, see Figure 5.2.

Four different scenarios are evaluated in the normal fitting: (1) NPV’s mean value; (2) NPV’s confidence

level at 95%; (3) zero profit probability; and (4) Base case with 100$ a barrel. Figure 5.11 shows the

results of the concession’s evaluation model applied on a bronze oil field (6 Gb) situated in North

America, which has its specific capital costs ( 𝑟𝑐𝑐𝑗,𝑟 = 8.445 [$ 𝑏𝑏𝑙⁄ ]). It was used a constant level II

production, see Table 4.7, through all projects’ life cycle. By analysing the figure is possible to perceive

that this is an investment with a low risk of being unprofitable. It has 2% probability of having negative

Page 81: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

66

NPV. Also, at a confidence level at 95% has PI equal to 3.44 (244 %) and mean IRR of 40.66 %. This

values are unrealistic (significantly higher than found in literature) because they use the model’s

calibration for the desired game’s balance, which is this works propose. However, the levelized cost of

energy (LCOE) consider is 8.88 $/bbl. The LCOE is not a result from the model, it is obtained from the

research made together with Brito (2012) applied to the current model calibration values. The LCOE

obtained is in line with actual values practiced in the oil industry (James, 2009). Table 5.4 resumes the

concessions evaluation results. It is presented project’s economic metrics mean values for an oil field

and an electricity project.

Table 5.4 – Project’s economic metrics mean values results

FIELD 𝛍𝐍𝐏𝐕𝒑

𝒊

$MM

𝛔𝐍𝐏𝐕𝒑𝒊

$2MM

𝐏𝐈𝒑𝒊

%

𝑰𝑹𝑹𝒑𝒊

%

𝑫𝑷𝒑𝒊

years LCOE

EU_O_B_3 882 228 201 147 244 40.66 3.25 8.88 $/bbl

EU_S_B_1 78.191 5.073 11 19.02 16.51 0.19 $/kWh

Comparing both Bronze fields, oil and solar, it is clearly that the oil investment is much more profitable

than the solar one. However, oil NPV mean standard deviation σNPV𝑝𝑖 is relatively higher, with the

same order of magnitude that the mean expected NPV μNPV𝑝𝑖 . While in the solar case, the investment

is less profitable, although the risk is considerably inferior.

5.4 Auction

As discussed above, blocks’ licences can be acquired through two different ways: (1) administrative

procedures, also known as beauty contests; and (2) auctions (Cramton, 2007). Auctions are generally

more transparent than administrative procedures. Auctions can be designed in such a way as to make

them robust to political and lobbying pressure as well as corruption. In some contexts, this could be

an important consideration. The transparency of the procedure and awarding criteria would make it

more difficult for the government to unfairly favour one investor over others. Furthermore, auctions

offer advantages over other resource allocation systems in that they convey information about how

valuable bidders believe the block to be, and which bidder values it most (Afualo and McMillan,

1997).This may be important in under-explored or frontier areas ,where information is scarce and the

government may not be reasonably confident of the precision of its value estimate. An auction can not

only raise revenue for the government, but also generate an efficient allocation, which is assign the

licences to the firms able to make the best use of them. The government needs to know how highly

firms value the public resource if it is to allocate it efficiently (Afualo and McMillan, 1997). A bid reveals

the bidder's approximate valuation of the resource. Investors are reasonably confident of the precision

of their value estimates. An auction, therefore, is not just about raising money. An auction reveals

Page 82: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

67

information of how valuable the investors believe the resource to be, and which bidder values it the

most. These advantages, associated with the desirable competitions that it brings, and should be

present in the game, justifies its implementation in the game.

The first step is product definition of what is being sold. There are two key elements: (1) the contract

and fiscal system suggested by the host government, which address key parameters such as duration,

royalties and tax obligations (Cramton, 2007); and (2) the geologic properties of the blocks, such as the

porosity and permeability (Gomes and Alves, 2011). The former was already discussed in section 5.2.

The determination of the geologic properties are outside of this work scope. It is assumed to be known

the oiip of each licence area.

There are four basic forms of auctions (Tordo et al., 2010): (1) Ascending bid (English auction) – the

price is raised until only one bidder remains. With this type of auction, each bidder knows the level

of the current best bid at any point in time and can adjust its bidding strategy accordingly; (2)

Descending bid (Dutch auction) – as opposed to the English auction, the price is lowered from an initial

high called by the auctioneer until one bidder accepts the current price; (3) First price sealed bid.

Bidders submit sealed bids and the highest bidder is awarded the item for the price he bid.

Each bidder has only one chance to submit its bid and cannot observe the behaviour of other

bidders until the auction is closed and results are announced; and (4) Second price sealed bid (Vickrey

auction) – bidders submit sealed bids and the highest bidder wins the item but pays a price equal to

the second highest bid (Vickrey, 1961).

The best auction format depends on the investor preferences and the degree of competition. The one

that Biodroid suggest was a derivation of the first price sealed. At a turn if more than one company

desire to acquire the same field, an action occurs. As mentioned, companies order is randomly

established in the beginning of each turn. The first in line gets to hold a token that allows him to bid

twice in the same turn. This twist gives to the token holder the options to deviate the field from an

opponent if the highest bid is not his own. Figure 5.12 illustrates the game’s auction house aspect.

It is possible to observe that Joroen de Jong (second on the left) holds the token, at this turn. The AI

development, that permit companies to decide how much should their bid be, was Biodroid

responsibility. However, in the model implementation, it was used the economic metrics obtained in

the previous section, more precisely the NPV, which is the more representative for a project’s

evaluation. Due to the risks and uncertainties, companies bid based in a worst-case scenario. Therefore

the NPV at a 95% confidence is the value used. After estimate the fields’ profitability, a random value

is computed between 0 and 1 with a distribution positive skewed, i.e. higher probability of getting a

value close to 0.

Page 83: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

68

Figure 5.12 - Auction house

This implementation is consistent with Afualo (1997), which affirms that: “the bid underestimates

value, since the bidder is bidding for some profit”. The random distribution used was the exponential,

with mean parameter𝑚𝑢 equal to 0.1 (𝑚𝑢 = 0.1), see Equation 5.12, to expect bidding prices around

1% of NPV𝑝𝑖 (5%).The software’s random algorithm provides 𝑥 at each call.

bid𝑝𝑖,1 =

1

𝑚𝑢𝑒

−𝑥𝑚𝑢 × NPV𝑝

𝑖 (5%) 5.12

The company that hold the token , offers 1% more, than the highest bid if decides to acquire the field,

is defined as bid𝑝𝑖,2. The decision to buy is related with the current capital. If the highest bid is inferior

than25% of company’s current capital, the field is purchased.

Page 84: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

69

6 Final Remarks

In this chapter, is presented the most important conclusions taken from the work developed in this

thesis. Moreover, a number of possible future developments for this model are discussed in order to

improve its applications and making it independent from the other models.

6.1 Conclusions

In this work a model is developed that simulates energy companies immersed in a non-real

environment. The model can be integrated into the macroeconomic and financial models initially

proposed. A balance between games’ aspects, required by Biodroid, and real elements from energy

industry had to be made in order to attain the initial objective, which was to use this model (along with

the others) as a background for the Energy Wars game.

This work has resulted in a model that can actually be played. At each turn, a list of actions is released.

Each players at his turn, decides which action he wants to perform, from the given list.

The main objective of the model was to provide decision tools to use in the decision process being

implemented posteriorly. The decisions that were made throughout the conception of the model took

into account the trade-off between the flexibility needed by the game designers and the increasing

complexity of the model. To aim for the game’s scenario, where oil was a scarce resource that

progressively is being substituted by renewable resources, the oil upstream industry was implemented

to capture all oil process since its exploration to market. Moreover, renewable technologies and energy

resources were studied, to support the claim that wind, solar and hydro are sufficient to suppress all

energy needs, in the actual context that we live. To calibrate the model with costs and production

values that are similar to reality, a database was developed together with Mário Brito.

Although the main objective for the model is to support the Energy Wars development it can be

calibrated to be used for more serious studies. Using the model implementation for the world

configuration, it is possible to replicate the finite amount available of natural resources. Regarding the

renewables resources, they could be calibrated for the maximum power capacity. Ranks could be a

fuzzy classifications for different irradiation levels (solar) or average wind velocities (wind).

Throughout the model implementation, it was concluded that the parameter that stands for the

number of total fields in the world (t_fields) can have huge impact. If it is small (e.g. 100), companies

rapidly feel the necessity to explore new regions and the interaction between players happens much

earlier in the game. While in the opposite case, companies might not leave the region where they have

started.

Page 85: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

70

In the current condition, the model is driven by the new fields that are being released. After an initial

period, where companies do everything that is possible to do, they achieve a state where no more

headquarters (HQ) and facilities can be built and the limit of units have been reached. This happens

because only energy related actions were fully implemented. Units, such as mercenaries, are in

position to be ordered what can attacked. Therefore new fields, and consequently the energy

investments necessary to developed them, are the only action taking place.

Regarding to the forecasting exercise of energy prices and interest rates the conclusions obtained are

the following. Oil Brent price is observed to have a higher forecasted density between the 100 $ and

200 $ interval. Therefore, it is possible to deduce that crude oil Brent prices should remain high, above

100 $, with a clear tendency to increase. While for the residential and industrial average end-user

electricity price, is observed that the forecasted density stabilizes between the 9 US₵ and 12 US₵

interval. Furthermore, the geometric Brownian motion (GBM) model experiences some overshooting

prices’ random walks, which could be explained by the data calibration relative to the Iraq’s War (2003)

and the start of last economic crises (2008). It is observed the mean reverting property of the mean

reverting model (MRM) used on the real interest rate that tend to oscillate around 2%.

It was concluded that for the decision processes regarding capital budgeting decisions in the energy

industry all economic metrics should be considered, although the Net Present Value (NPV) is the more

important. Investments in the energy industry are very capital incentive with the consequence that,

capital budgeting decisions have impacts that last for many years, reducing flexibility. Consequently

poor capital budgeting can have serious financial consequences.

The risk management process implemented in this work is one of the more complex processes that

nowadays are used to evaluate natural resource projects. Additionally this feature can be very useful

to differentiate different company’s traits. It can be concluded in the results of the risk analysis for

both fields, oil and solar, that an investment on an oil field can be much more profitable comparing

with a renewable one. However, implies a considerable higher risk, which can be explained by the oil

prices’ volatility.

6.2 Future Work

The main focus of an extension to this work should be the development of an independent AI. In this

thesis, is proposed a partial observed Markov decision process (POMDP) to support companies in the

decision process. At each turn, companies have the information of every action that they can make,

and its respective information. With it, they can compute an optimum policy based on a utility that can

be different from one company to another. Companies could have different preferences, such as: (1)

maximize profit; (2) destroy opponents; (3) prone renewable; and so on.

Page 86: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

71

Game theory aspects could be implemented both in auction and on the quantity of product supplied

to the market using a Cournot’s Nash equilibrium under Oligopoly market. For this, it would be

necessary to provide the ability for companies to store non sold product.

An important ABM characteristic that was not addressed in the model is the possibility of bankruptcy,

where an agent/company is withdrawn from the market and replaced by other. Moreover, could also

be implemented the possibility of a company to contract loans to support any investment.

Portfolio optimization theory could be implemented using Markowitz’s theory and the results from

section 5.3. These results are the field’s evaluation expressed in both NPV’s mean and standard

deviation. Adapting the values, using PI, transforming them into returns and risk (volatility) per dollar

invested, a new field acquisition could be compared with any other kind of investment options, such

as shares, bonds, treasury bills, etc. Moreover, fields could be shared by more than one company.

The forecasted prices and interest rates could be improved. Data from futures market could be used

to perform a weighted average over the different random paths’ simulated. Using the error between

the spot and future price, for instance one month ahead (~10%) or one year ahead (~30%) a higher

weight could be given to the random walks that pass within that error bars window contributing to a

real educated guess.

Throughout the model, it was developed more appropriate methods to evaluate natural resources

investments. Similar consideration could be taken on renewables fields, to improve their risk analysis.

Specially, if a proper discount cash flow model and a typical renewable electricity production fiscal

system were implemented.

The giant field’s data base could be used for companies to explore real fields. Moreover, calibrating

the model with a proper oil production profile, it could be studied when the peak oil happen and the

current position in the Hubert curve.

Page 87: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

72

7 References

Abbott, A., 2013. Gaming improves multitasking skills. Nature 501, 18.

Afualo, V.I., McMillan, J., 1997. Auctions of rights to public property, The New Palgrave Dictionary of Economics and the Law, ed. Peter Newman. Graduate School of International Relations and Pacific Studies, University of California, San Diego.

Al Gore, 2011. 8th Annual Games for Change Festival.

Annual Energy Outlook, 2014.

Araújo, T., 2011. Introduçao à Economia Computacional, 2a ed. Almedina, Coimbra.

Babusiaux, D., 2007. Oil and gas exploration and production: reserves, costs, contracts. Editions Technip.

Bancel, F., Lathuille, Q., Lhuissier, A., 2013. Why is “ your ” WACC necessarily wrong ? Paris.

Barma, N.H., Kaiser, K., Minh, T. Le, Lorena, V., 2012. Rent to Riches? The Political Economy of Natural Resource–Led Development. The World Bank, Washington, D.C.

Barro, R.J., Sala-i-Martin, X., 2003. Economic growth, 2o ed. MIT Press.

Barsky, R., Kilian, L., 2004. Oil and the Macroeconomy Since the 1970s ( No. 10855), NBER. Cambridge.

Bäuerle, N., Rieder, U., 2011. Markov Decision Processes with Applications to Finance. Springer.

Bigman, D., Taya, T., 2002. Floating exchange rates and the state of world trade and payments. Beard Books.

BP - Statistical review of world energy, 2012.

BP Annual Report and Form 20-F: Financial Statements, 2013.

Bratman, M., 1987. Intention, plans, and practical reason.

Brealey, R.A., Myers, S.C., 2012. Principles of corporate finance. Tata McGraw-Hill Education.

Brito, M., 2012. Resources dispersion.

Brito, M., Folgado, A., 2012. Energy wars - Energy Resources and Costs.

Brito, M., Sousa, T., 2013. Development of a “energy mix scenario” and a “electricity as main energy resource scenario” for electricity demand up to 2010. Int. J. Sustain. Energy Plan. Manag. XX, 18.

Brühlmann, F., 2013. Gamification From the Perspective of Self-Determination Theory and Flow. University of Basel.

Page 88: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

73

Buyuksahin, B., Drollas, L., Elder, J., Kaminski, W., Mason, C.F., Smith, J., 2013. Oil Price Forecasts and Trends: Interviews with the Experts, in: Review of Environment, Energy and Economics. FEEM.

Caillois, R., 1961. Man, Play, and Games. Free Press, New York, NY.

Carvalho, O., Magalhães, J., Sousa, T., 2013. A Macroeconomic Model For An Oil Scarcity Scenario 1–17.

Chowdhury, N., 2012. Is Nuclear Energy Renewable Energy? [WWW Document]. URL http://large.stanford.edu/courses/2012/ph241/chowdhury2/ (accessed 1.1.14).

Clark, D., 2013. Beginning C# Object-Oriented Programming, 2o Edition. ed. Apress.

Corti, K., 2006. Games-based Learning; a serious business application. Inf. PixelLearning 34, 1–20.

Cramton, P., 2007. How Best to Auction Oil Rights, in: Escaping the Resource Curse. p. 38.

Crookall, D., Oxford, R., Saunders, D., 1987. Towards a Reconceptualization of Simulation: From Representation to Reality. Simulation/Games Learn. 17, 147–71.

Crookall, D., Saunders, D., 1989. Towards an integration of communication and simulation. Commun. Simul. From two fields to one theme 3–29.

Dake, L.P., 1983. Fundamentals of reservoir engineering. Elsevier.

Davies, D., 2001. Production technology II. Edinburgh, Scotland.

De Lisi, R., Wolford, J.L., 2002. Improving children’s mental rotation accuracy with computer game playing., The Journal of genetic psychology.

Deaton, A., Laroque, G., 1992. On the Behaviour of Commodity Prices. Rev. Econ. Stud. 59, 1.

Deci, E.L., Gagné, M., 2005. Self-determination theory and work motivation. J. Organ. Behav. 331–362.

Delloite, 2013. Gamification Goes to Work, in: Tech Trends. pp. 52–59.

Deng, S., 2000. Stochastic Models of Energy Commodity Prices and Their Applications: Mean-reversion with Jumps and Spikes ( No. 073), PWP. Berkeley.

Deterding, S., 2011. Situated motivational affordances of game elements : A conceptual model, CHI 2011.

Deterding, S., Dixon, D., Khaled, R., Nacke, L., 2011a. From Game Design Elements to Gamefulness : Defining “ Gamification ” MindTrek’11 9–15.

Deterding, S., Dixon, D., Khaled, R., Nacke, L.E., 2011b. Gamification : Toward a Definition, in: CHI. Vancouver, BC, Canada, pp. 12–15.

Duarte, P., 2012a. Game Design Document V.2. Biodroid Entertainment Group, Lisbon.

Duarte, P., 2012b. General Gamelay. Biodroid Entertainment Group, Lisbon.

Page 89: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

74

Duarte, P., Folhadela, N., 2013. Game Design Document. Biodroid Entertainment Group, Lisbon.

Dupacova, J., Hurt, J., Stepan, J., 2003. Stochastic Modeling in Economics and Finance. KLUWER ACADEMIC PUBLISHERS.

Eck, R. Van, 2006. Digital Game-Based Learning: It’s Not Just the Digital Natives Who Are Restless. Educ. Rev., Educause Review 41, 1–8.

Econometrics Toolbox Guide, 2012.

End, J.W. Van Den, 2013. Statistical evidence on the mean reversion of interest rates. J. Invest. Strateg. 2, 91–122.

ESA, 2013. Essential facts about computer and video game industry.

Farmer, J.D., Foley, D., 2009. The economy needs agent-based modelling. Nature 460, 685–6.

Fernández, P., 2011. WACC : Defenition, Misconceptions and Errors ( No. 914), WP. Navarra.

Feygin, M., Satkin, R., 2004. The Oil Reserves-to-Production Ratio and Its Proper Interpretation. Nat. Resour. Res. 13, 57–60.

Garris, R., Ahlers, R., Driskell, J.E., 2002. Games, Motivation, and Learning: A Research and Practice Model. Simul. Gaming 33, 441–467.

Gåsland, M.M., 2011. Game Mechanic based E-Learning. Norwegian University of Science and Technology.

Glasserman, P., 2004. Monte Carlo methods in financial engineering. Springer.

Global entertainment and media outlook 2011–2015: Events & Trends, 2011.

Global entertainment and media outlook 2012–2016: Industry Overview, 2012.

Gomes, J.S., Alves, F.B., 2011. O universo da indústria petrolífera: da pesquisa à refinação, 2o ed. Calouste Gulbenkian.

Groh, F., 2012. Gamification - State of the Art Definition and Utilization.

Grove, A.S., Burgelman, R.A., Schifrin, D., 2008. U.S. Dependence on Oil in 2008: Facts, Figures and Context. Standford.

Gudmundsen, J., 2006. Movement aims to get serious about games. USA Today.

Hendricks, K., Porter, R.H., Tan, G., 1993. Optimal Selling Strategies for Oil and Gas Leases with an Informed Buyer. Am. Econ. Assoc. 83, 7.

Höök, M., Hirsch, R., Aleklett, K., 2009. Giant oil field decline rates and their influence on world oil production. Energy Policy 37, 2262–2272.

Hull, J.C., White, A.D., 1996. Using Hull-White Interest Rate Trees. J. Deriv. 3, 26–36.

Page 90: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

75

ICE Crude & Refined Oil Products, 2014.

Indicative values of WACC, 2011.

Interest Rates and Yields - Money Market - Monthly, 2014. . Sydney.

Jacobson, M.Z., Delucchi, M. a., 2011a. Providing all global energy with wind, water, and solar power, Part I: Technologies, energy resources, quantities and areas of infrastructure, and materials. Energy Policy 39, 1154–1169.

Jacobson, M.Z., Delucchi, M. a., 2011b. Providing all global energy with wind, water, and solar power, Part II: Reliability, system and transmission costs, and policies. Energy Policy 39, 1170–1190.

James, T., 2009. Should We Invest ? – Petroleum Economics.

Johnston, D., 1994. International petroleum fiscal systems and production sharing contracts. PennWell Books.

Kannan, D., Lakshmikantham, V. (Eds.), 2002. Handbook of stochastic analysis and applications. Marcel Dekker, Inc.

Katsaliaki, K., Mustafee, N., 2012. A Survey of serious games on sustainable development, in: Proceedings of the 2012 Winter Simulation Conference. pp. 1528–1540.

Klopfer, E., Squire, K., Jenkins, H., 2002. Environmental Detectives: PDAs as a window into a virtual simulated world. Proceedings. IEEE Int. Work. Wirel. Mob. Technol. Educ. 95–98.

Li, Z., 2004. The Potential of America’s Army as civilian public sphere. MIT.

Lopez, C., Reyes, J., 2009. Stationary properties of the real interest rate and the per-capita consumption growth rate: empirical evidence for theoretical arguments. Appl. Econ.

Lund, H., Kempton, W., 2008. Integration of renewable energy into the transport and electricity sectors through V2G. Energy Policy 36, 3578–3587.

Ma, M., Jain, L., Oikonomou, A., 2011. Serious games and edutainment applications, Vasa. Springer London.

Macal, C.M., North, M.J., 2010. Tutorial on agent-based modelling and simulation. J. Simul. 4, 151–162.

Maples, B., Saur, G., Hand, M., 2013. Maintenance Strategies to Reduce the Cost of Offshore Wind Energy Installation , Operation , and Maintenance Strategies to Reduce the Cost of Offshore Wind Energy. Denver.

Matlab - Object oriented programming, 2012.

McColl, R.W., 2005. Encyclopedia of world geography. Infobase Publishing.

McGonigal, J., 2011. Reality is broken: Why games make us better and how they can change the world. Penguin. com.

Page 91: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

76

McWhertor, M., 2010. U.S. Army Accused Of “Video Game”-Like Behavior In Disturbing Leaked Iraq War Video [WWW Document]. URL http://kotaku.com/5510188/us-army-accused-of-video-game-like-behavior-in-disturbing-leaked-iraq-war-video (accessed 5.12.14).

Meade, N., 2010. Oil prices - Brownian motion or mean reversion? A study using a one year ahead density forecast criterion. Energy Econ. 32, 1485–1498.

Methodology Report – input assumptions and modelling, 2012. . Sydney.

Meyer, J.C., 2014. Logics for Intelligent Agents and Multi-Agent Systems 1–25.

Michael, D.R., Chen, S.L., 2006. Serious Games: Games That Educate, Train, and Inform, Education. Thompson Course Technology.

Mitchell, A., Savill-Smith, C., 2004. The use of computer and video games for learning: A review of the literature. Development, Tertiary The use of computer and video games for learning.

Moulder, S., 2004. Fun with a purpose, in: Presentation at the Serious Games Summit. San Jose, CA.

O’Brien, H.L., Toms, E.G., 2008. What is User Engagement? A conceptual framework for defining user engagement with technology. J. Am. Soc. Inf. Sci. Technol. 59, 938–955.

Oil&Gas Giant Fields, 2011. . AAPG Datapages.

Osmundsen, P., Asche, F., Misund, B., Mohn, K., 2005. Valuation of International Oil Companies - The RoACE Era ( No. 1412), CESIFO.

Peersman, G., Van Robays, I., 2012. Cross-country differences in the effects of oil shocks. Energy Econ. 34, 1532–1547.

Pergler, M., Rasmussen, A., 2014. Making better decisions about the risks of capital projects. Ottawa.

Pindyck, R.S., 2004. Volatility and Commodity Price Dynamics. J. Futur. Mark. 24, 1029–1047.

Poortinga, W., Aoyagi, M., 2013. Public Perceptions of Climate Change and Energy Futures Before and After the Fukushima Accident : A Comparison between Britain and Japan Wouter Poortinga and Midori Aoyagi. Cardiff.

Proj. Energy Wars - Relatório n.o 3, 2013. . Lisboa.

Promoting Revenue Transparency: Report on Oil and Gas companies, 2011. . Berlin.

Puterman, M.L., 2005. Markov Decision Precesses - Discrete Stochastic Dynamic Programming, 2o ed. John Wiley & Sons, Inc.

Rafferty, M., R. Glenn Hubbard, O’Brien, A.P., 2012. Macroeconomics, 1st ed. Pearson Education, Inc.

Rao, A.S., Georgeff, M.P., 1995. BDI Agents : From Theory to Practice. Practice 95, 312–319.

Rao, A.S., Georgeff, M.P., 1997. Modeling rational agents within a BDI-architecture, in: Readings in Agents. pp. 317–328.

Page 92: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

77

Rebonato, R., 1996. Interest-rate option models, 2o ed. John Wiley & Sons.

Rens, G.B., 2010. A belief-desire-intention architecture with a logic-based planner for agents in stochastic domains. University of South Africa.

Robelius, F., 2007. Giant Oil Fields – The Highway to Oil. Uppsala University.

Romp, G., 1997. Game Theory: Introduction and Applications, 1st ed. Oxford Press.

Russell, S., Norvig, P., 2010. Artificial Intelligence, 3rd ed. Pearson Education, Inc., New Jersey.

Ryan, R.M., Deci, E.L., 2000. Self-determination theory and the facilitation of intrinsic motivation, social development, and well-being. Am. Psychol. 55, 68–78.

Sawyer, B., Rejeski, D., 2002. Serious Games: Improving Public Policy through Game- based Learning and Simulation.

Schwartz, E.S., 1997. The Stochastic Behaviour of Commodity Prices: Implication for Valuation and Hedging. J. Finance 52, 923–973.

Shafiee, S., Topal, E., 2009. When will fossil fuel reserves be diminished? Energy Policy 37, 181–189.

Shreve, S.E., 2004. Stochastic calculus for finance II: Continuous-time models. Springer.

Sicart, M., 2008. Defining Game Mechanics. Game Stud. 8, 1–14.

Smith, N.J., Merna, T., Jobling, P., 2013. Managing risk in construction projects. John Wiley & Sons.

Smith, W., 2010. On the Simulation and Estimation of the Mean-Reverting Ornstein-Uhlenbeck Process.

Sousa, T., Boavida, J., Carvalho, O., Brito, M., 2012. Projecto “Energy Wars - Relatório técnico-científico n.o 2. Lisbon.

Steinkuehler, C.A., 2006. Why Game (Culture) Studies Now? Games Cult. 1, 97–102.

Susi, T., Johannesson, M., Backlund, P., 2007. Serious Games – An Overview.

The Neurology of Gaming [WWW Document], 2012. URL http://www.onlineuniversities.com/neurology-of-gaming

Tordo, S., 2007. Fiscal Systems for Hydrocarbons Design Issues ( No. 123). Washington.

Tordo, S., Johnston, D., Johnston, D., 2010. Petroleum Exploration and Production Rights: Allocation Strategies and Design Issues ( No. 179). Washington.

Tweedie, A., 2003. Petroleum Economics. Edinburg, Scotland.

Vasicek, O., 1977. An equilibrium characterization of the term structure. J. financ. econ. 5, 177–188.

Verbeek, M., 2004. A Guide to Modern Econometrics, 2nd ed. John Wiley & Sons Ltd.

Page 93: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

78

Vickrey, W., 1961. Counterspeculation, Auctions, and Competitive Sealed Tenders. J. Finance 16, 8–37.

Weighted average cost of capital: Incorporating a return on capital in the 2013 electricity determination, 2012.

Werbach, K., Hunter, D., 2012. For the Win: How Game Thinking Can Revolutionize Your Business. Wharton Digital Press.

Whitt, W., 2002. Stochastic-process limits: an introduction to stochastic-process limits and their application to queues. Springer.

Willingham, D., 2012. Mining Economics with Matlab [WWW Document]. URL http://www.mathworks.com/videos/mining-economics-with-matlab-81952.html?form_seq=conf1050&&wfsid=5520141

Wirl, F., 2012. OPEC’s Strategies. Zeitschrift für Energiewirtschaft 36, 227–237.

Wittgenstein, L., 1958. Philosophical Investigation.pdf, 1st ed. Blackwell.

Wooldridge, M., 2000. Reasoning about rational agents. MIT press.

Wooldridge, M., 2002. An Introduction to Multi Agent Systems. John Wiley & Sons, Inc.

Wooldridge, M., Jennings, N.R., 1995. Intelligent agents: theory and practice. Knowl. Eng. Rev. 10, 115.

World Economic Outlook: Recovery Strengthens, Remains Uneven, 2014. . Washinton.

World Oil Outlook, 2013.

Ye, M., Zyren, J., Shore, J., 2006. Forecasting short-run crude oil price using high- and low-inventory variables. Energy Policy 34, 2736–2743.

Yergin, D., 2011. The quest: energy, security, and the remaking of the modern world. Penguin Press, New York, NY.

Zicherman, G., Cunningham, C., 2011. Gamification by Design: Implementing Game Mechanics in Web and Mobile Apps, 1o ed. O’Reilly.

Zyda, M., 2005. From visual simulation to virtual reality to games. Computer (Long. Beach. Calif). 38.

Page 94: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

A1

Annex A - Serious Games on Sustainable Development

Year Game name Source/Reference of the name

1990 SimEarth www.abandonia.com/en/games/185

1999 Build a Prairie www.bellmuseum.umn.edu/games/prairie/build/sb1.html#

2000 Learning Sustainable Development (LSD)

Torres and Macedo (2006)

2004 Balance of the Planet

www.cdosabandonware.com/std_games_details.php gameid=1639

2005 AtollGame Dray et al. (2005)

MHP Guizol and Purnomo (2005)

2006 SHRUB BATTLE Michelin (2006)

3rd World Farmer www.3rdworldfarmer.com/

Climate Challenge www.bbc.co.uk/sn/hottopics/climatechange/climate_challenge/

2007 Stop Disasters! www.stopdisastersgame.org

Energyville www.energyville.com/energyville/

EnCon CITY www.enconcity.com/

2008 World Without Oil

Rusnak, Dobson, and Boskic (2008); www.worldwithoutoil.org/

Environment Game www.mysusthouse.org

Building Game www.mysusthouse.org

ElectroCity www.electrocity.co.nz/

The Great Green Web http://go.ucsusa.org/game/

SymbioCity www.symbiocity.org

LogiCity www.logicity.co.uk/

Catchment www.catchmentdetox.net.au/

Millennium http://mvsim.ccnmtl.columbia.edu/accounts/login/

Oiligarchy www.molleindustria.org/en/oiligarchy

Clim’way http://climway.cap-sciences.net/us/index.php

2009 THE SIMS adapted Tragazikis and Meimaris (2009)

Shortfall Isaacs et al. (2009); www.coe.neu.edu/Groups/shortfall/

Green City Shivshankar and Thirumavalavan (2009)

Power explorer Gustafsson, Bång, and Svahn (2009)

PowerUp www.powerupthegame.org/

2010 EnerCities www.enercities.eu/

Fate of the World: Tipping Point

www.fateoftheworld.net/

Precipice www.precipice.altereddreams.net/

CityOne www.01.ibm.com/software/solutions/soa/innov8/cityone/

2011 SOS 21 Cahier et al.(2011); www.sos-21.com/Enter-the-game.html

EnergyLife Gamberini et al.(2011)

Ludwig www.playludwig.com/en/

2012 Total Energy Mix http://www.totalgeniuscampus.com/

City On http://www.cityon.pt/

2014 Freshhh (MolGroup) http://freshhh.net/

Page 95: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

A2

Annex B - Main script’s source code

tic % Start initialization time

%% Add folders and subfolders of BioSimple to search path add_paths

%% Debugging options echo off; dbstop if error; profile off

%% Initialization. Erase workspace, previous variables and figures close all; clear all; clearvars; clc

%% Define conditions initial_conditions

%% Compute fields number and create regions regions

%% Creates fields on all regions and sort the recource distribution fields

%% Initialise oil companies companies

%% Creates cites on diferent regions cities

%% Agents Behavior behaviour

% desire = 'lean'; desire = 'do_all';

%% Actions declare_actions

%% Initialize environment [ environment ] = init_environment(in_cond);

toc % Stop initialization time

%% Time Loop. Substitute later for a while cycle for time = 1 : in_cond.nruns tic

%% ENVIRNONMENT % unlocks fields in region were companies are present [reg] = unlockfield2 (reg, time, in_cond.nuclear_fields);

% Energy Prices [ environment ] = update_energy_prices (time, environment);

%% Companies loop % Create companies' random move order comp_order = randperm (length (comp(:))); ... comp_order = comp_order (:);

Page 96: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

A3

for i = comp_order'

%% BELIEFS %% See environment

[ comp, reg ] = see_struct_stats ( ... comp, i, time, fieldsMap, reg ... );

[ comp ] = see_free_fields (... comp, reg, i, time, fieldsMap... );

%% Deliberation %Options & Filter

[ comp, actionsmap ] = options_2 ( ... comp, i, time, reg, actionsmap, fieldsMap, ... in_cond.hire_after_end, in_cond.repair_if_hp_below, ... in_cond.memory_limit... );

%% PLANS % Intention......Mean Ends Reasoning

if ~strcmp(comp(i).behaviour.deliberative.desires,'do_all');

[comp, reg, environment,decision_vector, actionsmap] = ... planning( ... comp, actionsmap, fieldsMap, reg, i, time, environment ); else [comp, reg, actionsmap] = to_do_list (... comp, actionsmap, fieldsMap, reg, i, time... ); end % After deliberate and decides which actions list execute

returns a % logical array to index in the actionlist for comp(i) & time

%% Execute

% Execute actions [comp, reg] = comp_execute (... comp , actionsmap, fieldsMap, reg, i, time... );

%% Update Belifies (get another percept)

% Update pending list [comp, reg, actionsmap] = pending_list (... comp , actionsmap, reg, i, time... );

[ comp, reg, environment ] = refreshstatus_time_loop( ... comp, i, time, reg, fieldsMap, environment ); end % companies cycle end

Page 97: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

A4

%% Auctions function

[ comp ] = main_auction(comp, reg, time, actionsmap, fieldsMap);

%% Add one month to the time vector date(time+1)= addtodate(date(time),1,'month'); date = date(:);

toc

end

%% Clear support variables clear_vars

%% % clc

% profile viewer

Page 98: A Serious Game on Sustainable Development Using Agent Based … · Pai: Thank you for everything that you still teach me, good and bad, for everything that you allow me to do and

A5

Annex C – Cost of Renewable Energy: Solar Example, Summary

Results

Outputs Summary units Current Model Run

Net Year-One Cost of Energy (COE) ¢/kWh 19.15

Annual Escalation of Year-One COE % 0.0%

Percentage of Tariff Escalated % 0.0%

Does modelled project meet minimum DSCR requirements Yes

Does modelled project meet average DSCR requirements Yes

Did you confirm that all minimum required inputs have green check cells

Net Nominal Levelized Cost of Energy ¢/kWh 19.15

Inputs Summary

Selected Technology Photovoltaic

Generator Nameplate Capacity kW dc 2,000

Net Capacity Factor, Yr 1 0 17.7%

Production, Yr 1 kWh 3,101,354

Project Useful Life Years 25

Payment Duration for Cost-Based Tariff Years 25

% of Year 1 Tariff Rate Escalated % 0%

Net Installed Cost (Total Installed Cost less Grants) $ $6,333,755

Net Installed Cost (Total Installed Cost less Grants) $/Watt $3.17

Operating Expenses, Aggregated, Yr 1 ¢/kWh -3.59

% Equity (% hard costs) (soft costs also equity funded) % 55%

Target After-Tax Equity IRR % 12.00%

% Debt (% of hard costs) (mortgage-style amort.) % 45%

Debt Term Years 18

Interest Rate on Term Debt % 7.00%

Is owner a taxable entity Yes

Federal Tax Benefits Used "as generated" or "carried forward" As Generated

State Tax Benefits Used "as generated" or "carried forward" As Generated

Type of Federal Incentive Assumed Cost-Based

Tax Credit- or Cash- Based ITC

Other Grants or Rebates No

Total of Grants or Rebates $ NA

Bonus Depreciation assumed Yes

Source: Sustainable Energy Advantage, LCC