• No results found

Automated grazing management

N/A
N/A
Protected

Academic year: 2019

Share "Automated grazing management"

Copied!
66
0
0

Loading.... (view fulltext now)

Full text

(1)

Rochester Institute of Technology

RIT Scholar Works

Theses

Thesis/Dissertation Collections

1-1-2008

Automated grazing management

Gregory J. Von Pless

Follow this and additional works at:

http://scholarworks.rit.edu/theses

This Thesis is brought to you for free and open access by the Thesis/Dissertation Collections at RIT Scholar Works. It has been accepted for inclusion in Theses by an authorized administrator of RIT Scholar Works. For more information, please [email protected].

Recommended Citation

(2)

Automated

Grazing

Management

Master's Thesis

Gregory

J. Von Pless [email protected]

Department ofComputer Science

Rochester Institute of

Technology

(3)

Signatures

I, Gregory J. Von Pless, do hereby submit this thesis in partial fulfillment of

the requirements for the degree of Master of Science in Computer Science.

It is approved by the committee members below.

Gregory J. Von Pless

Dr. Zack Butler, Ph.D.

Committee Chair

Dr. Leon Reznik, Ph.D.

Reader

(4)

Title of

Thesis or Dissertation

Name of Author

Degree Program College Print Reproduction Permission Granted Print Reproduction Permission Denied

Inclusion in RIT Digital Media Library ETD Archive

Thesis/Dissertation

Author Permission Form

Graduate Student Form

0.

beLlS

Rochester Institute of Technology B. Thomas Golisano College of Computing and Information Sciences

Department of Computer Science Building 70, Room 3005

I understand that I must submit a print copy of my thesis or dissertation to the RIT Archives, per current RIT guidelines for the completion of my degree. I hereby grant to the Rochester Institute of Technology and its agents the non-exclusive license to archive and make accessible my thesis or dissertation in whole or in part in all forms of media in perpetuity. I retain all other ownership rights to the copyright of the thesis or dissertation. I also retain the right to use in future works (such as articles or books) all or part of thesis or dissertation.

I,

G ..-

2

0ry

V61"'

P[ ess

,

he.eby

.,ant p.,mission

to the

Ro~st'r

Institute of Technology to reproduce my print thesis or dissertation in whole or in part. Any reproduction will not be for commercial use or profit.

Signature of

Author~

_ _ _ _ _ _ _ _ _ _ _ _ _

Date._5--L~_I_5':,,-VC_o._f{

__

I, , hereby deny permission

to the RIT Library of the Rochester Institute of Technology to reproduce my print thesis or dissertation in whole or in part.

Signature of Author _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Date _ _ _ _ _ _ _ _

G

r~

CJry

V

.. "

P{e6.$

I,

d

~

,

additionally grant to the

Rochester Institute of Technology Digital Media Library (RIT DMU the non-exclusive license to archive and provide electronic access to my thesis or dissertation in whole or in part in all forms of media in perpetuity. I understand that my work, in addition to its bibliographic record and abstract. will be available to the world-wide community of scholars and researchers through the RIT DML. I retain all other ownership rights to the copyright of the thesis or dissertation. I also retain the right to use in future works (such as articles or books) all or part of this thesis or dissertation. I am aware that the Rochester Institute of Technology does not require registration of copyright for Electronic Thesis and Dissertations (ETD). I hereby certify that. if appropriate, I have obtained and attached written permission statements from the owners of each third party copyrighted matter to be included in my thesis or dissertation. I certify that the version I submitted is the same as that approved by my committee.

(5)

Acknowledgments

I would like to thank all ofmy

family

members and friends who were sub jected to talkofcattle and grazingmanagement at great lengththroughout thisprocess especial thanksto my parents, andto

Chris,

Liz, Tino,

and

Tay,

who Ibelieve suffered the lion's share in this regard. I'd like to thank Professor Butler for his guidance and continued patience as this process dragged on.

ThankstoLinusandSamandtheirgraduate student minionsforputting upwithmymyriad requestsforrunawayprocessestobe killedsomysimula tions couldfinish this century.

Finally,

aspecial thankyoutoTina

Sturgis,

who has given me aid and advice on countless occasions, and who helped me convince myselfto get intothis whole Master's degreemess in the first
(6)

Contents

1 Introduction 1

2 Related Work 4

2.1 Computerized Animal Control 4

2.1.1

Herding

With Robots 4

2.1.2 Dynamic Virtual Fences 5

2.2

Evolutionary

Algorithms andExpert Systems 6

2.2.1

Evolutionary

Algorithms 6

2.2.2 Expert Systems 7

2.2.3

Optimizing

Expert System Parameters 8

2.2.4

Building

Expert Systems 8

2.2.5 A Hybrid Hybrid Approach 13

2.2.6 Adaptive Expert Systems 14

3 Algorithm Design 16

3.1

Herding

Algorithm 16

3.1.1 General Procedure 17

3.1.2 Variables 18

3.1.3 Adaptive Expert System 19

3.2

Evolutionary

Algorithm 22

3.2.1 Genotype 23

3.2.2 Crossover 23

3.2.3 Mutation 24

3.2.4 Parameters 24

3.2.5 Fitness Calculation 25

3.2.6 Initial Population 27

4 Implementation and Evaluation 28

4.1 Simulator 28

(7)

IV

4.1.1 Forces 29

4.1.2 Vegetation Consumption and Growth 32

4.2 Experiments 32

4.2.1 Herd Drift 35

4.2.2 Vegetation

Quality

andElevation 37

4.2.3 FullSimulation 40

4.2.4 Adaptive Expert System 45

4.2.5 Reduced Thirst

Frequency

48

4.3 ResultsAnalysis 50

5 Conclusion 53

(8)

List

of

Figures

3.1

Grazing

management algorithm 17

3.2 On-line adaptation algorithm 21

3.3

Defining

membershipfunctions 23

4.1 Seed system 1 memberships 33

4.2 Seedsystem 2 memberships 34

4.3 Seedsystem4 memberships 35

4.4 Experiment 1 field 36

4.5 Experiment 1 results 37

4.6 Experiment 2 field '. 38

4.7 Experiment 2 control results 38

4.8 Experiment 2 results 39

4.9 Experiment 3 field 41

4.10 Experiment 3 control results 41

4.11 Experiment 3 results 43

4.12 Experiment3 stress-basedfitness Evenness memberships . . 44

4.13 Experiment 3 combinedfitness HAPPINESS memberships ... 45

4.14 Experiment 4 results 46

4.15 Experiment 4 result field2 explained 49

(9)

List

of

Tables

3.1 Expert system operators 20

3.2

Evolutionary

algorithm parameters 25
(10)

Abstract

Management-intensive grazing is a grazing management strategy that re

lies on careful monitoring of animals at pasture and frequent relocation

of animals between various regions of the pasture, or paddocks, in order

tomaximizethe nutrients and sustenancetheanimalsobtainthroughgraz

ing. Whenappliedsuccessfully, thisapproachtograzingmanagementyields higheranimal production, whilecuttingfeed costs;

however,

agreat deal of

overhead is introduced in monitoring and moving the animals throughout the pasture, making this approach very difficult to implement at a large scale.

Recent successes in the field of dynamic virtual

fencing

have demon

strated the

feasibility

ofautomatically restrainingandmoving cattle within a pasture, and without the need to build or move fences. This technol

ogy may be used toreduce the physical overhead of management-intensive

grazing, but it doesnot address the

decision-making

aspects.

This thesis proposes a

decision-making

system to be used in conjunc

tionwith dynamicvirtualfence

technology

toimplement afully-automated
(11)

Chapter

1

Introduction

Grazing

managementistheprocessthroughwhich animal

foraging

behaviors

specifically, the rates at which various regions of a pasture are grazed are controlled [1]. The goal is to maximize forage production, or the sustenanceand nutrition gainedthrough

foraging,

whichinturncontributes to the maximization of animal production. In order to understand grazing management, one must first understand the players: the animals, and the vegetation.

When left to their own devices at pasture, animals exhibit a tendency toward re-grazing certain areas; some causes of this behavior include the presence of

higher-quality

vegetation, proximity to water, or the presence of shade on a hot day.

Furthermore,

vegetation that is regrowing after

being

grazedismore

juicy,

palatable,andnutritiousthanmaturevegetation, causing animals to prefer re-grazing areas they have previously visited to grazing areas consisting ofmore mature growth.

Mature,

undergrazed plants have greater stem mass, makingthem less

digestible and nutritious. Overgrazed plants do not possess sufficient leaf mass to generate the energy required for regrowththrough photosynthesis;

they

must obtainthisenergy fromtheroot structure, resultingina stoppage ofroot growth [1].
(12)

CHAPTER 1. INTRODUCTION 2

ofthe trade-off between maximizingthe evenness ofpasture coverage while

minimizingthe stress to cattle.

The most common grazing management strategy worldwide is contin

uous grazing

[2],

wherein the cattle are allowed free access to the entire pasture

(i.e.,

cattle stress istotallyminimized atthecost ofcoverage). Con tinuous grazing is simple and requires minimal overhead. It also provides animals access to plant regrowth in the stages ofhighest nutritional value.

Continuous grazing generally leads topoor grazingdistribution (due to the aforementionedanimalbehaviors). Placementofdistributionalaids, such as

artificialfeedand watersources, canoften

help

tominimizethisproblem

[3]

. An alternative to continuous grazing is management intensive grazing:

a strategy that has been studied and used for at least 25 years, and that is generally considered

theoretically

sound, but is rarely implemented in its strictestform becauseitoften conflicts withpractices already inplace. This grazing management strategy relies on the subdivision ofthe pasture into paddocksthrough the deploymentofpermanent and

temporary

fencing

[4]

. Permanent fencesare usedtodividetheprimary paddocks;

temporary

fences

are used to prevent access to an overgrazed section of the paddock, or to force spot grazing of a previously undergrazed area. The grazing manager

has at his disposal the selection of active paddocks or subregions and the stocking rate in each paddock or subregion as tools for

implementing

in tensivegrazing. Management intensive grazingrequiressignificantlygreater overhead, in the form of fence

building

and maintenance costs and labor

costs, as compared to continuous grazing; inthe case ofbeefcattle, it has

been showntoyield an increase inpounds ofbeefproduced per acre of over

533% oftypical continuous grazingyields

[4]

.

Management intensive grazing requires moving animals between pad

docks approximately once every three

days;

these paddocks should not be larger in sizethan 5 acres, with stocking rates ofapproximately 10 animals

per paddock [5]. The time and labor commitment required to meet these requirements aresubstantialinthecontext ofasmallfarmor ranch (in

fact,

many farmers tend to bend these guidelines in practice). In the context of an extremely large ranch, they appear to greatly outweigh the benefits in increased animal production. The

King

Ranch in Texas is agood example:

it consists ofapproximately 825,000 acres (compare to RhodeIsland's size of approximately 776,957 acres) and about 60,000 head of cattle [6]. In a strict application of intensive grazing, these cattle would be split among

(13)

in-CHAPTER 1. INTRODUCTION

tensive grazing would require the

building

and maintenance ofagreat deal ofadditionalfencing. The

King

Ranch currentlycontainsanestimated2,000

miles offence.

Depending

on the estimator used, the annual maintenance costofthesefencesrangesfrom$422,400

[7] (assuming

theleast costlyfence

type)

to$6.6 million[8].

However,

ifmanagementintensive grazingcouldbe

implemented with significantly less overhead, it would mostly

likely

prove

profitable at all scales.

Previous work has shown that virtual fences effectively prevent cattle

leaving

a virtualpaddock, and can beusedto movethemfrom onelocation to another

[9], [10],

[11]

(see Section 2.1.2). Virtual

fencing

presents the

potential for large-scale reductionin

fencing

andlaborcosts, asthegrazing managerwould need onlyto choosethepaddock, orpaddocks, he wishesto

be active, and allowthe automated system movethe cattle there and

keep

theminplace. Fromthispoint, thenextlogicalstep istoautomatethegraz

ing

management

decision-making,

ashuman management, even with virtual

fences,

would still require managing up to

hundreds,

or even thousands, of small paddocks.

This work presents a preliminary approachto automating the intensive

grazing management process; to the author's

knowledge,

no other algorith mic solution to this problem has been published. The solution presented here relies onthe use of an expert system to modelthe

decision-making

of the grazing manager: it determines when, and to where, the cattle should be moved;

however,

rather than determine the appropriate rules in the traditional manner

(by

consulting a domain expert), rules are learned via

an evolutionary algorithm.

Grazing

management decisions are often very

situation-specific,so it would bedifficult togleangenerality from adomain expert, whereasanevolutionary algorithm will be asgeneral, orspecific, as its fitness function allows. The procedure for evolving expert systems used inthisworkismodified fromandinspired

by

a number ofpre-existingmeth
(14)

Chapter

2

Related

Work

2.1

Computerized Animal Control

Multiple approaches to automated animal containment and motion induc tion have proven promising or successful. These approaches provide the foundation for artificially intelligent grazing management: the ability to move animals fromone location to another automatically.

2.1.1

Herding

With Robots

Vaughanet al. have been experimentingwith arobotic sheepdog for quite

some time

[12],

[13]. Their technique exploits the predictability of

flocking

behavior in the animals to be herded in a relatively simple feedback

loop

algorithm. The robot always maneuvers such that the herd centroid will be located between it and agoal

location,

with the understanding that the herd will flee from the robot toward the goal. This work was shown to be

fairly

successful in controlled real-world experiments

involving

ducks.

The robot sheepdog accomplishes successfully the task set to an actual

(15)

CHAPTER 2. RELATED WORK

2.1.2 Dynamic Virtual Fences

In virtual

fencing,

a virtual paddock is defined using a positioning system,

such as GPS. Animals are confined within the virtual paddock not

by

a physical

barrier,

but rather through theapplication of stimuli design todis

couragethem from

leaving [9], [10],

[11]. Commonstimuli include auditory

hints

(threatening

predatornoises, orthe variouswhoops and calls used

by

cattlemen when moving cattle, for example) or electric shocks. Some sys

temsuse a combination ofstimuli, providingan auditory warningbeforethe virtualfenceis reached, followed

by

electric shocks of

increasing

severityas thecow crosses thefence. Results have been better with the use ofelectric

shocks, as cattle become aware that the auditory signals are not actually coming from predators or cattlemen.

Dynamic virtual fences are virtualfences that move over time

(i.e.,

the locationat whichthefencestimuliare appliedischanged). Currentprogress

in dynamic virtual fences includes successfully restricting cattle movement

withinthevirtualpaddock,movingcattle

by

slowly movingthevirtual pad

dock,

and

inter-pose,

path-, and fence-planning. Butler et al. successfully influenced the motion of a herd in simulation, and obtained encouraging

results with realcattle

[9]

.

They

usedan

exclusively auditorystimulus com posed of a

library

of predator sounds, which were chosen at random. This approach was

initially

successful, but suffered from habituation.

Anderson et al. used a hybrid audio/electric shock system that did not suffer from habituation [10]. In their experiment, 2 cows were confined with avirtual paddock bounded on three sides

by

virtual

fences,

and

by

a conventional barbed-wire fence on the fourth. The north and south virtual fencesmovedin tandem at a speed ofl.lm/hr for 10 hourseachday. Over the courseofthe nine-daytrial, neither cowsuccessfullyescapedthevirtual paddock.

Butler et al. added further automation to their virtual fences through

an algorithmforplanningthe corridor betweentwo desiredvirtualpaddock poses [14]. Thisalgorithm uses anA* searchtogenerate abaselinecorridor, whichisthenmodifiedtoavoid obstacles whennecessary,ortoenclosethem if

they

are small enough. Cattle are guidedthrough the corridor

by

a series
(16)

CHAPTER2. RELATED WORK 6

2.2

Evolutionary

Algorithms

and

Expert

Systems

A large

body

of prior work exists in the fieldsof both evolutionary expert systems and adaptive expert systems.

Many

methods of evolving expert systems have been

developed,

operating with various levels of complexity. Anumberofthesemethods arediscussed

here;

theirdrawbacksarediscussed in Chapter 3.

2.2.1

Evolutionary

Algorithms

An evolutionary algorithm attempts to simulatethe biological processes of adaptation, mutation, and natural selectionto evolve a solution to a prob lem. Thealgorithm consists of a population of

individuals,

witheachindivid ual representinga solution. Individuals are evaluated

by

afitness

function,

and then the fittest individuals are chosen to create the next generation. This process isrepeated until the population converges.

The evolutionary algorithm consists ofthe

following

components:

Genotype The genotypeis therepresentation ofthesolution on whichthe genetic operators act. This is generally an arrayor tree.

Crossover Operator Crossover istheact ofcombiningtwoor more parent individualstoproduce thesame number of newindividuals. Themost common crossover operator is 1-point crossover, whichis most easily understood in the context of an array-based genotype. A cut point n is chosen; thefirst child's array contains the first n values ofthe first parent'sarray, and thevalues

following

the firstn values ofthesecond parent's array; thesecond child's array is composed ofthe remaining values.

Mutation Operator Mutation is the act ofrandomly altering some part of an individual'sgenotype. Thetwomost commonformsare replace ment

(e.g.,

replacing a random value in arraywith a newvalue), and swapping

(e.g.,

swapping two randomly selected arrayvalues).
(17)

CHAPTER2. RELATED WORK 7

randomlywith aprobabilityproportionalto theirfitness. Fitness pro

portionalmethods are preferred because

they

occasionallyselect unfit

individuals,

whose genetic material should remainintheglobalgenetic

pooltoprevent earlyconvergence.

2.2.2 Expert Systems

Here is presented a very brief review of rule-based expert systems. In a

rule-basedexpert system, aset of rulesis used, along withthecurrent envi

ronment state, toperform

inferencing

and generate an output or a decision.

Generally,

each rule is ofthe form: ifx, then y; in a ruleofthis

form,

x is

referred to as the antecedent, and y as the consequent. The results of each ruleare aggregatedin some mannerto produce asingle output, or multiple outputs or actions may begenerated.

Fuzzy

expert systems make use of

fuzzy

sets in order to express rules at a higher level. A

fuzzy

set is a set whose elements are members ofit to

certaindegrees. This may be formalized

by

stating that the membershipof

avariable xin a

fuzzy

set A is:

Ma

(x)

=

f(x),

where

/

isa function returninga value in the range

[0,

1].

Rules in a

fuzzy

expert system are generallyof the form: if x is in A, then y is in B, where A and B are

fuzzy

sets with pre-defined membership

functions. The degree to which y is in B is

determined,

through a process

known as

denazification,

using the degree to which x is in A. In addition

to generating the set of rules, the developer must also specify the

fuzzy

membership functions. The advantage ofthis approach over simple expert

systems is that the rules read more like a person's reasoning. For

instance,

consider the

following

two rules:

1. If it is cold, thenI should dress warmly.

2. If it is less than

40F,

thenI should cover 90% ofmy body.

Rule #1 is fuzzy: the words "cold" and

"warmly"

do not have a specific

meaning;

however,

forthepurposes ofunderstanding why theagentutilizing
(18)

CHAPTER 2. RELATED WORK

2.2.3

Optimizing

Expert System Parameters

Perneelet al. propose a manner for performingexpert systemoptimization on atiered system [15]. In theirexpert systems, the rules are grouped into anumberof

levels,

with the rules in eachlevel

being

related.

Furthermore,

each rule, and each

level,

is assigned a weight, which affects that rule's or

level'seffect ontheoveralldecision-making. Optimization isperformedover the overall weighting of the

levels,

the weighting of the rules within the

levels,

and the parameters

defining

the

fuzzy

membership functions. The

chromosome,

0,

is definedas

0 =

(Pi,

...,

Pn,Wn,

...^nMn^Hn,

,HnMn)

where /% represents the weight associated with the ith

level,

uiij represents theweight of rule

j

underlevel

i,

0#i;

isa vectorcontainingthemembership

functionparametersforrule

j

underlevel i, nisthenumber of

levels,

and

Mj

is thenumber of rules underlevel i.

Basically,

thegeneticalgorithmisgiven control over the influenceof each rule, the influenceof each group of rules, andthe shapeofthe

fuzzy

membership functions.

Thus,

given animperfect expert system generated

by

a

human,

thegenetic algorithmfine-tunes it to better solve thegiven problem.

An important component ofPerneel's and his colleague's genetic algo rithm is the calculation offitness: how does one determine if a given rule weighting is good? In this case, a

learning

database is used. The

learning

databaseconsistsofa setofdecisionproblems paired withdesired decisions. Eachexpert system's fitnessis measured as a sum of absolute errorbetween the system's output andthe desired output foreach databaseproblem.

Perneeletal. have appliedtheiralgorithmtoan object recognition prob lem: classifyingtargets given two-dimensional infrared images. The expert system must first determinethe orientation ofthevehicleinthe

image,

and then makethe classification.

A basis forresultscomparison was obtained

by building

an expert system

manually to solve the problem. After optimization, the new expert system outperformedthe manual system in 40.5% of cases. In 55.0% ofcases, the optimized system performed

identically

to the original,andin4.5%ofcases, theoptimized system performed worse.

2.2.4

Building

Expert Systems
(19)

CHAPTER 2. RELATED WORK

give thegenetic algorithm more power. This can mean allowing it to build

therule set

itself,

tochoose the membershipfunctions along with their pa rameters, or both. Although thegenetic algorithm's increased control may allow it to find even better solutions, there is an explosion in termsof the

size ofthesearch space whenthefullcontentsofthe rulesandmemberships are part of the chromosome.

Any

approach to evolving an expert system must imposesomelimitationsonthesearchspace, or convergencemaynever occur.

Evolving

New Rules

Drabarek et al. overcome the complexity of evolving a full

fuzzy

expert system

by

eliminatingthe fuzziness [16]. Stated more

formally,

they

utilize

threshold membership functions:

, ,

fo

if:c<0 /xA

{x)

= <

,

I 1 otherwise

where 9 is the threshold constant.

Furthermore,

the thresholds used are definedapriori, and arenot evolved.

Thus,

thegenetic algorithm must only searchthe space of possiblerules; still a vast space, but tractable.

The goalin Drabarek's and his

colleagues'

work wasto evolvenew rules for an expert system capable ofperformingdiagnostics on a radartransmit

ter. Theirchromosomeconsistsoftwologicalparts: therule antecedent (the "if"

clause), and the rule consequent (the "then" clause). Each antecedent is a vector of integers in the range

[1,1],

where each integer represents

one of 10 important symptoms (these are the connections between circuit components). A value of1 indicates that thesymptom shouldbe normal, a value of0 indicates that the symptomis not considered, and a value of 1

indicatesthat thesymptom shouldbeabnormal. Each consequent is a vec

tor ofintegers in the range

[0, 1]

, where each integerrepresents a symptom

or circuit component that should be checked. A value of 1 indicates that

the component or symptom should be checked, and a value of0 indicates

that it should not bechecked. Thewhole chromosomeis theconcatenation ofthe antecedent part and the consequent part.

Asin thework ofPerneelet al., the calculationoffitness is both impor

tant and non-trivial. Rather than providing training

data,

Drabareket al.

use a set ofheuristics to determine ifa given rule is acceptable. Rules are

judged

by

the

following

criteria1:
(20)

CHAPTER 2. RELATED WORK 10

1. A path from each incorrect antecedent symptom to each consequent

component should exist inthe circuit. Shorter paths are better.

2. A backward path from each consequent object to each correct an

tecedent symptom should existin the circuit.

3. Rules in which checking a consequent component is recommended,

despite all symptoms

leaving

that component

being

correct, are pe

nalized.

Theseheuristicsreward rulesthat appropriatelyrelate symptoms and com

ponents, and that do not recommend checking clearly operational compo

nents, which is wasteful.

Testing

experiments were run, in which the system was provided with information about two symptoms connected to a single component (one is

an

input,

the other is the output). The component has two other inputs. After running the genetic algorithm, rules

indicating

that the component

should becheckedif anycombination ofitsinput symptoms are correct and its output symptom is incorrect were evolved. The number of generations

required to obtain these rules, and the completeness ofthe generated rule

set, were both

decreasing

functions ofpopulation size. The system may be

considered a success, as it generated logical diagnostic rules;

however,

the

problem of rule generation was appliedtoa problem wherethe

full,

optimal rule set couldeasily begeneratedmanually

(and,

in

fact,

theauthors provide

this ruleset).

Separate Evolution ofRules and

Membership

Functions

The previous section's result indicates that rules can be evolved, but with

out considering membership functions. In this section, two approaches to

evolving both rules and memberships are discussed. As previously stated,

theproblem of an explosioninsearch spacecomplexityarises. Bothmethods

presented here account forthis issue

by

evolving the rules and membership functions separately, admitting an additive increase in complexity, rather

than a multiplicativeone.

Amaral et al. use a serial approach:

first,

rules areevolved; then, mem berships are evolved [17]. When evolving the rule

base,

the chromosome
(21)

CHAPTER 2. RELATED WORK 11

in

fuzzy

logic). All possible rules are dealt with in each chromosome be

cause the solution is

being

applied in evolutionary hardware.

Thus,

each ruleactuallyrepresents a possibleinputto someconfigurable

hardware,

and

the consequents are the hardware's outputs. Fitness for the first round is determined using "traditional

metrics"

(mean squared error or root mean

squarederror);

however,

thepaperdoes notdiscuss howexpectedvaluesare

determined: the process is most

likely

application-specific.

Once the rules havebeen evolved, a separategenetic algorithm is used

to optimize the

fuzzy

membership functions. In this step, the chromosome

consists of a vector of values

identifying

thevertexes oftriangularmember

ship functions (3 vertexes per

function)

. Once again, the details of fitness

evaluation are rather vague.

Amaral et al. tested their methodology

by

applying it to a simulated

evolutionaryhardwareproblem. Twoexperiments wereconducted, wherein

the evolutionary

fuzzy

system was asked to model two systems. For com

parison, the experiments were also performed on a neural-fuzzy system, called

NEFCON,

and a neural-genetic-fuzzy system, called NEFCON-GA.

NEFCON-GA had the best performance; the authors point out,

however,

that the NEFCON-GA produced rather irregular

fuzzy

membership func tions, which make the system more difficult for a human to interpret. The

evolutionary

fuzzy

system's more interpretable memberships demonstrate the trade-offbetweenperformance and interpret-ability.

An alternative to serial evolution of rules and memberships is parallel

evolution (co-evolution). Akbarzadeh-Tet al. propose a

co-evolutionary ap

proach toevolving

fuzzy

systems, wherein the rules areevolved via genetic

programming, andthemembershipsare evolved

by

agenetic algorithm [18].

Here,

search space complexity is lessened through the use of a

binding

ma

trix, which determines which rule sets combine with which membership

function sets (not all combinations are tried).

Furthermore,

the concept

of "friendship" is introduced: when a specific rule set/membership set pair

performs particularly well, itsbond is weighted.

ThemainfocusofAkbarzadeh-T 'sandhis

colleagues'

paperis computing

the fitness ofcombined individuals. Each rule set's fitness is calculated as

theweightedaverage ofitsperformance when coupled with eachmembership

function,

where the weights are determined

by

the level of

friendship

that

exists between each rule set

/membership

set pair. The performances are also used to determine modifications to these

friendship

levels. The fitness for eachmembershipset is computedin a similar manner.

The co-evolution method was tested

by

using it to evolve an expert
(22)

CHAPTER2. RELATED WORK 12

expert system isgiventhelast fourvalues ofthe series andmust outputthe nextvalue. The proposedmethod was

largely

successful, and outperformed both a static expert system and an expert system consisting of uniform

membership functions and rules evolved usinggenetic programming.

Evolving

Rules and

Membership

Functions Together

Calvoet al. developed a systemfor obstacleavoidance thatuses aconstruc tive neural network with a

fuzzy

system component [19]. A genetic algo

rithm builds a

fuzzy

system to determine when neurons should be added to the network (there is a trade-offbetween increased performance and in

creasedcomplexitywhenaddinganeuron);performanceofthe

fuzzy

system

is based on the number of nodes it adds to the neural network

during

an

obstacle avoidance task. In this genetic algorithm, rules and memberships

are evolved at the same time, in the same individual. The search space is limited

by

thefact that there areonly four inputs to the

fuzzy

system, and

only threepossible memberships for each inputto each rule.

The

fuzzy

system

being

evolved is not an expert system, but rather it is a classifier system. In this type ofsystem, only one ruleis executed: the

one withitsantecedentpart mostclosely matchingtheinput. Inthespecific application explored

by

Calvoet al., the winningrule's consequent value is

thenusedtodeterminewhetheranew neuron shouldbeaddedto theneural

network.

Each individual represents a set of rules and membership function pa

rameters; a single rule is encoded as:

Wo,

VUV2, V3,

A0, A0, A0, A1,A1,A1,A2, A2, A2,

A3, A3, A3,C],

where each

Vi

indicatesthesettowhichinput i should

belong

(0 LOW, 1 = MED,and 2=

HIGH),the

A{

values determinetheshapes ofthe membership

functionsforthe

fuzzy

variables, andCistherule consequent. Reproduction

consistsof one-point crossover and mutation.

Calvoetal. present an

interesting

approachtocreatingnew generations.

Anewgenerationis not created untiltheperformanceoftheneural network

decreases. Performance is determined

by

thenumber of collisionsthatoccur

whileattempting to navigate to atarget. Ifperformance is not

decreasing,

then the classifier system is properly adjusting the neural network, and so

should not be modified.

Theproposedsystem wastestedinmultiple simulated environmentsand

(23)

CHAPTER 2. RELATED WORK 13

to build a neural network with halfas many nodes that could successfully

collect targets andavoid obstacles nearly all ofthe time.

The approachtoevolvingexpert systemsdeveloped for thisworklies in

betweenthosediscussedinthelasttwo sections: therules andmemberships

are evolved via asingle evolutionary algorithm;

however,

thecrossover and mutation operators alwayshandle rules andmemberships separately.

2.2.5 A Hybrid Hybrid Approach

In this section, an approach fromShi et al. is presentedthat combinesideas

from the previousoneand from Xu and Vukovich [20]: evolvingthe fullex

pert system, bothrules and

fuzzy

memberships, andusinganexpert system

to optimize the genetic algorithm parameters [21]. The only search space

limitation imposed inthissystem comesfromthefixedrulecomplexity(this has beenafeature commontomost ofthesystems presented: rules perform

only a simple combination ofthe

inputs)

.

In the work ofShi et al., the chromosome is represented as a string of

integers. These integersencodethenumber of rulesinthe system, the

fuzzy

membership function types (there are six) and parameters for each

input,

and the rules. A maximum number of allowed rules is calculated a priori, and each chromosome encodes this many rules; the rule count encoded at

the

beginning

ofthechromosome indicates how manyofthe encoded rules are actuallyused; the rest are

ignored,

but are still encoded in order that the chromosomes all be of uniform length.

The rules encoded within a chromosome are not necessarily valid, so

a form of genetic repair must be performed. In this work, invalid rules are simply removed from the system when it is built from the chromosome

data. Invalidrulesaredefinedasthosecontainingeither no antecedent or no

consequent part. Ifall rules are removedfrom anindividualinthis manner,

it is assigned an arbitrarylowfitness.

Fitness is computed using

training

data. An application-appropriate error metric must be determined. In the case of function estimation, the authors recommend a relative error

function,

so that themagnitude ofthe targetoutputdoesnot affecttheerror calculation. Forclassificationsystems,

the authors recommend a comparison of correct classifications to incorrect

ones.

Shiet al.usean adaptive genetic algorithmtodecreaseconvergencetime.

The genetic algorithm's adaptation is accomplishedthrough a static expert

system, whichis designed tomitigate the trade-offbetween performingmu

(24)

CHAPTER 2. RELATED WORK 14

adaptationis toencourage crossover

during

the early generations, when fit

ness is

low,

and to encourage mutation

during

the later generations, when fitness is high. The motivation behind this is that mutation can tweak an

alreadyfit

individual,

while crossoveris bestforquickly changinglargeparts

of anindividual. Thus crossingfitindividuals hasagoodchance of

destroy

ing

what makesthem

fit,

whilemutatingunfit individuals willchange them little over manygenerations.

The systemhas been applied to a classification problem: classifying iris

specimens

by

species. The authors ran a number of simulations,

testing

with variousrestrictionsontheirsystem

(fixing

the memberships, turningoff

genetic algorithmparameter adaption, andboth). The systemthat evolved

bothrules and memberships, and used the adaptive genetic algorithm, had

the best overall performance both in correctness of classification and in

convergencetime.

2.2.6 Adaptive Expert Systems

Themethodsdescribedintheprevioussections allmodifytheexpert system

throughindirect

learning,

i.e.,

learning

is ultimately accomplished through

random modifications that eventually lead to a better result. This section

presents two methods for performing

learning,

or other modifications, in a

direct manner: adaptive-network-based

fuzzy

inference systems

(ANFIS),

which use backpropagation

learning

to arrive at optimal rules, and meta

rules, which are rules built into the expert system itself that operate on

other rules, ratherthan onthe expert system output.

Adaptive-Network-Based

Fuzzy

Inference Systems

ANFIS is a methodology proposed

by Jang

[22]

that combines

fuzzy

in

ference systems (expert systems) and artificial neural networks, in order

that the inference system rules and memberships may be learned from in

put/output

training

pairs. Althoughit isprimarilyan off-line methodology,

the ANFIS may be retrained at regular intervals to allow it to adapt to

newinformation. The ANFIS performsdirect

learning

in the sensethat its

learning

mechanism

deliberately

reducesthe difference between thedesired and actual outputs.

Thus,

the system's desired output must be known for

eachinput vector;

however,

as ismade more clearin Chapter

3,

theoutput

of the proposed expert system is not

known,

and its validity can only be determinedindirectly.

Therefore,

direct modificationmust be accomplished
(25)

CHAPTER 2. RELATED WORK 15

Meta-Rules

Meta-rules provide a mechanism for altering (either permanently or tem porarily) anexpert systemin an on-line manner basedupon current

input,

or other stored or gathered information. Meta-rules are often used to re

strict the number ofrules that actually fire for any given

input,

usually to increase the efficiency of the inference engine [23,24].

They

can also be used to add rules to, modify rules

in,

and delete rules from the system.

Jankowska

[25]

discusses the use of meta-rules for

detecting

and resolving contradictions betweenrules, a problemthatcanarisewhen rules are added
(26)

Chapter

3

Algorithm

Design

The automated grazing management solution presented in this chapter is

comprised oftwo major parts: the management algorithm, which actually

performs grazing management, employing an adaptive expert system for

decision-making,

andthe evolutionaryalgorithm, which isused tolearn the

best expert system given some fitness metric.

The evolutionary algorithm and on-line expert system adaptation algo rithmcomplement one another

by

performingglobal and local

learning

and

adjustment, respectively. The evolutionary algorithm operates on a met

ric supplied at the end of testing, representing the overall performance of

the system; the on-line adaptation algorithm operates throughout testing,

making adjustments to the system based on observed cause-effect relation

ships while it runs.

Furthermore,

because the procedure through which

the evolutionary algorithmlearns is ultimatelyrandom, whereas theon-line

adaptation is based on reasoning, together the two algorithms account for

twoformsof solution modificationoccurring

during

humanproblem-solving:

identifying

that the current solution is inadequate andexperimenting with

possible changes tosee if it can be improved

(evolutionary

algorithm), and

deducing logically

correctionstobemadeto thecurrentsolutionbasedupon observations ofits effectiveness (adaptation algorithm).

3.1

Herding

Algorithm

A

herding

algorithmusingan expert systemtoperformdecisionmakinghas been developed. Thealgorithmadaptsitself inanon-line manner

by drawing

conclusionsfromobserved cause-effect relationships, inorderthat a general

expert systemmay be applied to more than one specific

herding

situation.
(27)

CHAPTER 3. ALGORITHM DESIGN 17

Manage-Grazing

1 while true

2 dofor each cell

Q

G

{Ccurrent

UNEIGHBORS

(Ccurrent)}

3 do

R[i]

<-Score

(Q)

4 Goto

(Cargm^i{m})

5

WAIT(t)

Figure 3.1: High-level grazingmanagement procedure, t is the time towait between iterations.

Herd behavior shares a good deal of commonality;

however,

differences in

climate, timeof

day,

and cattle

breed,

amongothers, canaffecttheobserved

herd behavior. On-lineadaptation allows a general algorithmtobedeployed

inthesevarious situations andtweakitselfbasedupon runtime observations.

3.1.1 General Procedure

The procedure described in this section is inspired

by

the indirect cover age algorithm described

by

Pirzadeh and Snyder [26]. In indirect coverage,

the environment is split into a grid. The number of visits to each cell is

stored; when

deciding

whichcell tovisit fromthe current one, thecell with

the fewest total visits is chosen.

Eventually,

the whole environment will be visited at least once. The

herding

algorithm splits the field into a grid of

large cells (each cell should be large enough to allowthe cattleto graze for

awhile before they must be forced to move; management-intensive grazing

dictates 1-5 acres per paddock), andkeeps the cattle within one cell using four virtual fences deployed along the edges of the current cell, each hav

ing

infinite length. At a well-defined

interval,

an expert system is used to

calculate a score for the current cell and each cell within the current one's

4-neighborhood. Ifthe current cell's score is

highest,

then nothing is

done;

otherwise, the cattle are moved slowly to the cell with the highest score.

Thisprocess is repeated

indefinitely,

and is defined

formally

inFigure 3.1.

The GOTO function is quite simple. Since all virtual fences are infinite in

length,

and since movement is always in a cardinal

direction,

only two fences have to be moved. Thefence adjoining the new cell is

immediately

moved to the far end ofthat cell, so that the cattle may begin moving into
(28)

CHAPTER 3. ALGORITHMDESIGN 18

speedisslowenoughthatif anycattleareshocked

by

themoving

fence,

they

will be ableto move away from it quicklyenoughtoavoid

being

repeatedly

shocked. The

herding

algorithm is paused until movingto the new cellhas

completed.

SCORE

(Cj)

iscalculated using an adaptive expert system obtainedfrom

an evolutionary algorithm. Each rule in the expert system is ofthe form: "if expression, then y,"

where y is a real value. Let R* define the set of

all rules, andthe function y

(R),

for someR

R*,

denotethe output value

obtainedfrommultiplyingthe yvaluein R'sconsequent

by

theoverall

fuzzy

valueofi?'santecedent.

Then,

the totalscoreforthecell

Ci

is SCORE

(Cj)

=

J^ReR*y(R)-

Additionally,

thecurrentcell's scoreincludesa constantbonus

representing the inherent reduction in cattle stress obtained through not

movingthem.

3.1.2 Variables

Thissectiondescribesthevariables availabletotheadaptive expert system.

The

following

variables are cell-specific:

Vegetation The mean vegetation value forthe cell.

Water The percentage ofthe cell consistingof water.

Obstacles The percentage ofthe cellthat is impassable.

EVENNESS The difference inelevationbetweenthehighestandlowestpoints

in thecell, expressed as a percentage ofthemaximum possible differ

ence.

HAPPINESS Perceived happiness levelofthe cattlein the cell; this is calcu

lated as 1 min

(

1,

^

)

, where z is the number of shocks recorded

y ZmaxJ

in thecell forthegiven time period, andzmax is the number of shocks

per time period considered to represent massive stress levels among

the cattle (the value used is 1 shock per second).

Cell-AGE Avalue

representing both how

long

thiscellhas beenthecurrent

cell, and how

long

it has been sincethis cell wasthe currentcell.

The

following

variablesare equivalent acrossall cells:

LINEARITY Avaluerepresentinghowlinearthepathtaken

by

thealgorithm

has

been;

this is calculated as the ratio ofthe number of cells along

one axis that have been visited since the last axis changeto the total

(29)

CHAPTER 3. ALGORITHM DESIGN 19

Herd-Displacement Theratio ofthedistancetheherdwasdisplaced dur

ing

this time interval to the maximum displacement possible within

the cell and time interval. A very small herd displacement indicates

that the cattle are

bunching

at afence that

they

wish to cross; con

versely, avery high displacement indicates that the cattle are moving farther or fasterthan theynormallywould to find food or water.

TheHappiness and Cell-Agevariablesforeach cell are modified over

time. Cell-Ageis decremented

by

a constant valueforthecurrentcell and

incremented

by

a constant value for all other cells (it is capped within the

range [0,1]). The decrement for Cell-Age is larger than the increment.

Happiness is set forthe current cell usingthe aforementioned calculation.

For each cell, Happiness is incremented

by

a constant value (once again,

it must remain within the range [0,1]). These increments and decrements

occur each time the overall algorithm loops.

3.1.3 Adaptive Expert System

The adaptive expert system consists ofthree parts: the rule set, the

fuzzy

membership

functions,

andthreshold value 9. The rules are usedto calcu

late a score for acell, as described above.

Fuzzy

membership functions are

usedtodeterminetheextent towhichthecell's rawdata

belong

to thevari ables described inthe previous section. The 9value is used in the adaptive algorithm.

Rules

The expert system's rules are all ofthe form "if expression then y,"

where

y is the amount to add (or subtract) from the total score when expression evaluates to 1. The expression is a

fuzzy

expression composed of operators

and operands. Operands take the form of a

fuzzy

membership query for a specific variable. Table 3.1 describes thepossible operators.

Membership

Functions

Threetrapezoidal membership functions are stored for eachvariable, defin

ing

thatvariable's

fuzzy

membershipinthesetsLOW, MED, andHI. Theonly

limitations imposed uponthe definitionofthesefunctionsarethat the LOW

(30)

CHAPTER3. ALGORITHMDESIGN 20

Operator Syntax Evaluation

and exprl and expr2 min(exprl, expr2)

or exprl or expr2 max(exprl, expr2)

not not expr 1 expr

current-cell current-cell 1 ifthecell

being

processedisthecurrent

cell, 0otherwise.

reachable reachable 1 if the cell

being

processed is

directly

reachable from the current cell, 0other

[image:30.517.80.437.107.234.2]

wise.

Table 3.1: Operators found inexpert system rules.

On-line Adaptation

The adaptive algorithm maintains adirected graph associating the current

cell's environment with the current perceivedhappiness ofthe cattle; thus,

this graph provides arudimentary representation of cause and effect. The

current cell state at time t is represented

by

the vector

Stc

=

[V,0,W,A,E]

where

V,

O,

W,

A,

and E are integers

denoting

the

fuzzy

set (low =

0,

med=

1,

hi=

2)

towhichthevariables

Vegetation,

Obstacles,

Water,

Cell-Age,

and

Evenness,

respectively, most belong.

Likewise,

SlH

is the

set to which Happiness most belongs. The

following

multi-sets hold the

cumulative state:

sh

=

\Jstc,s*H

=

\JstH

t t

Theadaptivegraph

Gs^->s*H

is aweighted, directedgraph mappingcell

statesto perceived happiness with weights

indicating

the number of occur

rences of a specific mapping.

Thus,

v(Gsh^s*H)zZS*cUS*H

E

(Gsh^s*H)

=

|

(,

v,w)\u=

S_

,v = StH,w=

-(,)

(

|J

(Sfj, &)

J

1

wherethefunctionna

(B)

=thenumber of occurrences of a in multi-set B.

The algorithm to populate

Gs,-*s^,

determine when

learning

takes
(31)

CHAPTER 3. ALGORITHM DESIGN 21

Adapt

1 Obtain

S&

and

SH

2 if

(Sc,

SH,

w) GE

(gs*c^s*h)

for some w

3 then w <u;

+ 1

4 else

(GS.

^-)

- E

(gs^s-h)

U

{

(5*,,

5^,

l)

}

5

(5c,

Sh,

w) <

max, , _/_ \

1^}

6 if w > 9

7 then for each rule Rin theexpert system

8 do V<

the set of variables referencedin R

9 dHl^-Sell

10 if

SH

= 2

l,e 4 J.

12 if

SH

= 0

f 4-Jjy"I

13 then

Ay

< dmax<l,e * >

14

Ry^Ry

+

Ay

15

(G-S-s&)

<~^

(G^-s^)

[image:31.517.83.407.124.382.2]

-{(Sc,

SH,w)}

Figure 3.2: Pseudocodedescribingtheexpert system adaptation algorithm.

ofsignificance (the system's 9 value is the threshold for

determining

signif

icance;

see lines

1-6)

, and then modifies the consequent values ofthe rules

based upon their relevance to the cause-effect relationship

identified,

and

whether the effect (perceivedcattle

happiness)

is positive or negative (lines

8-15). Therelevance of a ruleto a cause-effect relationshipis measured

by

determining

the similarity between the cause (environment state) and the

state the rule attemptsto match.

In the pseudocode,

Ry

is used to represent the consequent value ofthe

rule R. The variable set,

V,

for ruleR is composed ofordered pairs

(v,

s),

where v is one ofthe system variables, ands is one ofthe three

fuzzy

sets.

For each operandin R ofthe formpa{v),

J(Jze{o,i,2}-s{(u'

z)) if ^(v) is withina notoperator,
(32)

CHAPTER 3. ALGORITHMDESIGN 22

The similarity,

d,

between

Sc

and V is computed as

d=

J_

D((v,s),V)

{v,s)esc

D{iv,s),v)

=

{1

if^eV'

I0 otherwise.

Note that d measures onlythe similarity betweenthe two sets, and not the

dissimilarity (i.e.,

thepresence of additional rulesinV doesnotdetract from thesimilarity score).

Theexponentialfunctionsintheconsequent modification equations(lines

11 and

13)

are designed to change the consequent value more

drastically

when its value is significantly different from the ideal. In the case that a

positiverelationshiphasbeen identified

(Sh

is

2,

orHI; line

10),

rules match

ing

the environmentthat producedHI Happinessshould increasethe cell's score.

Thus,

rules currently

having

a negative consequent value will see a

large

increase,

whereas rules already possessing a positive consequent will

see a smaller one. This behavior is intended to mimic a human modifying

his solution toa problem: inthecase that the solutionis

"way

off,"

he may

make largechanges;

however,

ifthe solution isclose, but not quite

right,

he

will mostly

likely

onlytweakitslightly. Inthecasethat a negative relation

ship has been identified (line

12),

the same method is used, but the ideal

consequent value is a negative one.

3.2

Evolutionary

Algorithm

The method for evolving expert systems described here performs a more

powerful expert systemrefinementthan thatpresented

by

Perneelet al. [15]:

a set of seed systemsisusedin generatingtheinitialpopulationto

help

limit

the search space to viable systems, but the evolutionary algorithm is able

to add, modify, and remove rules, as well as

being

able to alter member

ship functions.

Furthermore,

unlikethe methods described in the previous

chapter, the evolutionary algorithm operates on complex rules potentially

containing nested operators. These extensions allow the evolutionary algo

rithmto explore amuch largerportion ofthe total potential solution space than theaforementionedapproaches; asthealgorithmisgiven morefreedom

toexplore this space, it becomes lessnecessarythat theset ofsystems used

to seed the initial population contain a wide variety of genetic material,

(33)

CHAPTER 3. ALGORITHMDESIGN 23

1

08

06

04

02

0

X

*-'LOW

'MED

HI

[image:33.517.133.376.115.213.2]

x i2 x i6

Figure 3.3: Mappingofthesix membershipfunction parameters to three trapezoidal fuzzymembership functions.

3.2.1 Genotype

The phenotype for the evolutionary algorithm is the expert system

itself,

which was described in the last section. The genotype contains the same

information;

however,

inorder to discussgeneticoperators, adescriptionof

thegenotype's datarepresentation is required.

Each ruleis composed oftwoparts: theantecedent and theconsequent.

Theantecedent isan expressioncontainingoperators andoperands;since an

operandmay bean expressionin and of

itself,

theantecedent is represented

by

a tree, as is generally done in genetic programming. The consequent is

a single value, and so is stored as such. The genotype maintains a set of pairings of antecedent treesand consequent valuestorepresenttherules set.

Foreach variabledefined in Section

3.1.2,

three

fuzzy

memberships must

be

defined,

for the

fuzzy

sets LOW, MED, and HI. The parameters

defining

each functionare all stored in a singlearray ofthe form:

[a-ll,

X\2, 13, X14, ^15, 16, 21, ,Xn}

Thevaluesxn through x^definethe three trapezoidal membershipfunctions

for the ith variable; thisis shown in Figure 3.3.

3.2.2 Crossover

Crossover is performed separately on rule sets and membership

functions;

when two genotypes undergo crossover, both their rules and memberships

are affected. Forthe rulesets, 1-pointcrossoveris used atthe setlevel

(i.e.,

the first n rules are

kept,

and the remainder are swapped with the other

parent).

Swapping

of parts of rules occurs

during

mutation.

1-point crossover is also used for membership

functions; however,

the
(34)

CHAPTER 3. ALGORITHM DESIGN 24

This limitationprevents theneed forpost-crossovergenetic repair,

because,

within aspecific function

definition,

the function parameters must be non-decreasing.

Finally,

the adaptive 9 threshold undergoes 1-point crossover at the bit level.

3.2.3 Mutation

Mutation is performed

by

choosing one ofthe

following

operations at ran

dom:

Swap-Parts Swaps subtrees betweentwo randomlyselected rules.

MUTATE-MEMBERSHIPS Choosesamembershipfunctionat random and re

places it with a new, randomly generated membership function. The function generation algorithm ensures that the new parameters are

non-decreasing.

Add-Rule Generates a new rule.

Starting

with the root node, each node

hasa75% chance of

becoming

an operand. Onceall ofthe tree'sleaves

are operands or operators

taking

no arguments, the rule is complete. (Note: the algorithm isprevented fromgeneratingrules withonlythe

"current-cell"

operation).

Replace-Rule Removes a random rule and generates a new rule to add

in its place.

Remove-Rule Removes a random rule.

Mutate-Cons Choosesanew consequent valueforarandomlychosen rule.

The new value is chosen randomly from a uniform distribution with

range [4,4].

Mutate-Theta Onebit inthe

binary

representation of9 is flipped.

3.2.4 Parameters

Table 3.2 definestheparametersused

by

theevolutionaryalgorithm. Fitness

proportional selection is often preferableto truncation selectiondue to the

chance of selecting unfit individuals. This is because an individual may be globally unfit, but still possess useful genetic material; excluding these

(35)

CHAPTER3. ALGORITHM DESIGN 25

Parameter Value

Population Size 16

Mutation Rate 0.05

CrossoverRate 0.75

Elitism Rate 0.375

Parent Selection Fitness Proportional

Elitist Selection Truncation

[image:35.517.156.362.106.219.2]

SurvivorSelection Fitness Proportional

Table 3.2: Parametersusedbytheevolutionaryalgorithm.

amonggenetic material.

However,

truncationselection was chosen forpick

ing

the individuals to carry overfrom the previous generationbecause this

method guaranteesthat the best individuals are chosen. The fullspectrum

of genetic material from the previous generation still has the possibilityof

being

representedthrough crossover, as unfit individualsmaybeselectedas parents.

3.2.5 Fitness Calculation

Three fitnessmetrics weredesignedand usedinexperimentation:

coverage-based,

stress-based, and combined. The separatecoverage-based and

stress-basedmetrics were usedtodetermineifdifferentrulesetswouldbegenerated

given thesedifferentgoals. The combinedmetricforces the evolutionary al

gorithmtocompromisebetween maximizingcoverage andminimizingstress.

Coverage-Based Fitness

Coverage-based fitness requires that ideal coverage be defined. Here it is

defined in terms ofthe distribution of vegetation levels across the field at

the end ofsimulation; in order to determine the ideal

distribution,

the re

lationship

betweenthe cattle andthe foragematter, andthe needs ofeach,

must beconsidered.

Cattle obtain the greatest nutritional value from re-grazed vegetation,

because when a plant is growing, it is more digestible and provides more

protein; also, plants in earlier stages ofgrowth tend to bejuicier andtaste better to the cattle. Mature plants have greater stem mass, which makes

themless

digestible,

and contain more

fiber,

makingthemlesspalatable

[1],

(36)

CHAPTER 3. ALGORITHM DESIGN 26

are allowed to grow to larger than approximately 75% of their maximum size.

Whentoogreata percentage ofaplant'sleafvolumeisremovedthrough

grazing,

however,

it must consume nutrients stored in its roots to regrow

leaves. This results in root growth stoppage, which in turn can lead to a

weakened root system, lossof plant species, and areduction in forage yield

for the animals. Turner et al. and Poole

[1]

both indicate that overgrazing

occurs when plants are allowed to be reduced to less than approximately

halftheir maximum size.

Therefore,

the desiredvegetationdistribution may be modeled asanor maldistributionwith a mean value of66%ofthemaximum vegetation value.

This means that the average plant in the field is not so early in its growth cycle that it must suffer root growth stoppage to continue leaf growth if

grazed, and it is also not so mature that it suffers a reduction in nutri

tion or palatibility.

Thus,

coverage-based fitness is calculated as the raw

y2

test score when comparing thedistribution ofthe final vegetation levels

ofthe field to the ideal

distribution,

defined as a normal distribution with \x = 168.3 and a = 49.7 (where the maximum vegetation level is 255). A lower x2

score indicates a better match between the data and the desired

distribution,

sotheevolutionaryalgorithm should attempt to minimizethis fitness metric.

At the completion of a simulation run, the vegetation map is split into

20 meter

by

20 meter cells. Cells with fewer than 50 non-zero values are

ignored,

inordertoremove major obstaclesfrom consideration. An average level is taken for each cell, and the averages are collected in a histogram.

Finally,

thishistogram isusedto perform ax2

test,whose result represents

thefitness ofthe expert system in question.

Stress-Based Fitness

Stress-based fitness is calculated similarly to

Happiness,

except that here

it is unhappiness that is

being

determined. For each 15-hour segment of

runtime, the number of shocks per secondis calculated (capped at

1);

over all unhappiness is the mean ofthese values. The goal of the evolutionary

algorithm is tominimize this metric, as well.

Combined Fitness

The combinedfitness metric calculation is:

/

=
(37)

CHAPTER 3. ALGORITHM DESIGN 27

where x2

is the coverage-based fitness and u is the stress-based fitness, u

is taken exponentially toplace greater emphasis on low unhappiness values

(i.e.,

to punish severely a system whose overall unhappiness is high). Once

again, the evolutionary algorithm's goal is to minimize this metric.

Fitness

Short-Circuiting

In orderto saveon bothtime and processing, ashort-circuitingmechanism

is introduced to the fitness calculation. If no attempt to move the cattle

is made within 30 hours (this timeframe chosen for the specific simulation

environment), then thesystem inquestionis arbitrarilyassignedfitnessesof 50.0 and1.0 forthecoverage-and stress-based

metrics, respectively,yielding

a combinedfitnessscore of135.914 (comparethis toatypical set of metrics

for averypoor system: x2 ~

22*0,

u

0.5,

/

as 36.272).

3.2.6 Initial Population

A small set ofhuman-produced individuals is provided to the initial popu

lation algorithm, allowing ahuman to introduce rules that hebelieves will

be useful, or to introduce systems to be refined. Two systems are selected

randomlyfrom the set of seeds and are crossed over. Each ofthe resulting

childrenismutated. Themutated children are addedtotheset ofseeds, and

the process is repeated untilthe cardinality ofthe seed set is twice the de

sired population size. Atthis point, individuals are selected at random until

the desiredpopulation size is reached; these become the initial population;

(38)

Chapter

4

Implementation

and

Evaluation

4.1

Simulator

A simple cattle simulator was developedfor testing. This section describes

its final

functionality;

during

testing,

functionality

andcomplexitywere in

troducedintothesimulator

incrementally

inorder todeterminesystem per

formancegiven various sets of variables. Latersections

detailing

thevarious

experiments performeddescribe what simulator

functionality

was present.

The overall algorithm governing the simulated cattle is quite simple: a

number offorces are generated representing attraction and repulsion from

variousstimuli. Theseforcesareadded, adjustedformaximumturningrate

and speed, and applied to the cow. This process occurs for each second in

simulation time.

Muchofthesimulator

Figure

Table 3.1: Operators found in expert system rules.
Figure 3.2: Pseudocode describing the expert system adaptation algorithm.
Figure 3.3: Mapping of the six membership function parameters to three trapezoidalfuzzy membership functions.
Table 3.2: Parameters used by the evolutionary algorithm.
+7

References

Related documents

class I integrons and antibiotic resistance profile of Salmonella enterica serovars isolated from clinical specimens.. MATeRIAlS AND

Kho du lieu duqc xay dung de tien loi cho viec truy cap theo nhieu nguon, nhieu kieu du lieu khac nhau sao cho co the ket hop duqc ca nhung ung dung cua cac cong nghe hien dai va

Product Name Technical Licences Technical Licenses Required/ Optional GIS 8.0 Required GIS_INTERACTIONSERVICE 8.0 Required ics_custom_media_channel 8.0

In this PhD thesis new organic NIR materials (both π-conjugated polymers and small molecules) based on α,β-unsubstituted meso-positioning thienyl BODIPY have been

After Day, in the lighting of Moon Night wakens under a prayer to call hush to Day, time to commune. with Night, windswept under

helicase TWINKLE, the mitochondrial single-stranded DNA binding protein (mtSSB), mitochondrial RNA polymerase (POLRMT), and mitochondrial transcription termination factor mTERF1

National Conference on Technical Vocational Education, Training and Skills Development: A Roadmap for Empowerment (Dec. 2008): Ministry of Human Resource Development, Department

In addition, the findings further reveal that none of the studies investigate the mediating effect of the nature of innovation (incremental and radical) on the relationship