VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "clsGeneticAlgorithm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

' =====================================
'
'   Genetic Algorithm class
'
'        By Thierry Van Mol
'
'   First public release
'   version 1.0.0
'   2007 - 2008
'   email : thierry.van.mol@hotmail.com
'
' =====================================



'
' Constants
' +++++++++++++++++++++++++++++++++++++++++++++++++++

' Version
Private Const cVersion = "1.0.0"

' Maximum times to spin the roulettewheel before trying Rank
Private Const cRouletteWheelSpinMax As Integer = 3  ' when spinning the roulettewheel, a check is done to ensure both
                                                    ' chromosomes are different (not the value, but the index).
                                                    ' This constant is the number of times to spin the wheel
                                                    ' before jumping to Rank selection method

Private Const cCrossoverUniform As Double = 0.5     ' Probability of a swap in uniform crossover
                                                    ' 0.5 = 50% chance the bit will be swapped
                                                    
Private Const cLongMaxLength As Integer = 11        ' Maximum length of a long, used to convert a
                                                    ' long to a string. Range is -2,147,483,648 to 2,147,483,647
                                                    ' so (not counting the thousand separator)
                                                    ' maximum number of digits  : 10
                                                    ' eventual minus sign       :  1
                                                    ' 10 + 1                    = 11
                                                    '
                                                    ' However in order to maximize the functionality
                                                    ' of the GA, the length to use is calculated and
                                                    ' filled in mintLongActualLength
                                                    
Private Const cDoubleMaxLength As Integer = 22      ' Maximum length of a double number, used to convert
                                                    ' a double to a string
                                                    ' range is -1.79769313486231E308 to -4.94065645841247E-324 for negative
                                                    ' values; 4.94065645841247E-324 to 1.79769313486232E308 for positive values
                                                    ' maximum accuracy of double : 15 digits
                                                    ' place for the decimal point:  1
                                                    ' place for negative sign    :  1
                                                    ' place for 'E' character    :  1
                                                    ' place for negative power   :  1
                                                    ' maximum power              :  3 digits
                                                    ' 15 + 1 + 1 + 1 + 1 + 3     = 22
                                                    '
                                                    ' However in order to maximize the functionality
                                                    ' of the GA, the length to use is calculated and
                                                    ' filled in mintDoubleActualLength

'
' Events definition
' ++++++++++++++++++++++++++++++++++++++++++++++++++

' New Gene event
Public Event NewGeneString(ByRef strGene As String)

Public Event NewGeneLong(ByRef lngGene As Long)

Public Event NewGeneDouble(ByRef dblGene As Double)

' Fitness event
Public Event EvaluateFitness(ByVal lngIndex As Long, ByRef dblFitness As Double)

' New chromosome event
Public Event NewChromosome(ByRef NewStringGenes() As String, ByRef NewLongGenes() As Long, ByRef NewDoubleGenes() As Double, ByVal intOrigin As GANewChromosomeOriginType)

' Error
Public Event GAError(ByVal ErrorCode As Long, ByVal ErrorDescription As String)



'
' Class variables
' used with properties
' +++++++++++++++++++++++++++++++++++++++++++++++++++

Private mGeneration             As Long     ' the generation counter (set to 1 at CREATEPOPULATION
                                            ' and incremented during REPRODUCTION)

Private Chromosome()            As ChromosomeindividualType
                                            ' The chromosome...

Private mChromosomeType         As Integer  ' the type of chromosome we are going
                                            ' to use. defined in GAEncodingType
                                            ' 1 = binary string
                                            ' 2 = Alphabetical
                                            ' 3 = long numbers
                                            ' 4 = Double numbers

Private mGenesPerChromosome     As Integer  ' howmany genes are there in a chromosome

Private mBinaryGeneLength       As Integer  ' how long is one gene (howmany characters can
                                            ' a binary gene be)
                                            ' when encodingtype = binary

Private mAlphabeticGeneLength   As Integer  ' how long is one gene (howmany characters can
                                            ' an alphabetic gene be)
                                            ' when encodingtype = alphabetical

Private mLongGeneMaxValue       As Long     ' what is the maximumvalue of a long numerical gene
                                            ' when encodingtype = long numbers

Private mLongGeneMinValue       As Long     ' what is the minimumvalue of a long numerical gene
                                            ' when encodingtype = long numbers

Private mDoubleGeneMinValue     As Double   ' what is the minimumvalue of a double numerical gene
                                            ' when encodingtype = double numbers

Private mDoubleGeneMaxValue     As Double   ' what is the maximumvalue of a double numerical gene
                                            ' when encodingtype = double numbers

Private mSelectionMethod        As Integer  ' the selectionmethod used during the Selection process
                                            ' see the GASelectionMethod enumeration
                                            ' Can be Range, Roulette wheel or Tournament

Private mTournamentSize         As Long     ' the size of the selection pool of a Tournament during
                                            ' Tournament selection

Private mCrossoverRate          As Double   ' the corssoverrate

Private mMutationRate           As Double   ' the mutationrate - for fixed mutation
                                            ' or starting value for adaptive mutationrate

Private mActualMutationRate     As Double   ' the actual mutationrate to use
                                            ' if fixed it's the same as mMutationRate
                                            ' if AMR then this value changes by 0.01

Private mMutationBitlikeLongDouble As Boolean ' For long/double encoding only. And only if NOT full gene
                                            ' mutation !
                                            ' If FALSE, a small value will be randomly added / subtracted from
                                            ' the gene-value
                                            ' If TRUE, normal element-like mutation (just like binary encoding)
                                            ' will be used

Private mMutationBitlikePercentage As Double ' See mMutationBitlikeLongDouble
                                            ' This is the percentage of the maximum value for a gene.
                                            ' The random value to be added or subtracted will lie within
                                            ' this percentage's range.

Private mReproductionMethod     As Integer  ' the reproductionmethod used
                                            ' see the GAReproductionType enumeration
                                            ' Can be weakest, random or parents
                                            
Private mCrossoverFullGenes     As Boolean  ' If TRUE the crossover happens on a full gene
                                            ' if FALSE corssover can happen anywhere
                                            ' in the chromosome

Private mRandomOffspringGeneration As Boolean ' If TRUE a test is done before crossover to check
                                              ' that both selected chromosomes have different
                                              ' genetic material. If they are the same one of them
                                              ' is replaced by a new random chromosome

Private mCrossoverMethod        As Integer  ' The crossover technique to use
                                            ' one point, two point, uniform or half uniform
                                            ' see GACrossoverType

Private mMutateFullGenes        As Boolean  ' If TRUE the mutation happens on a full gene
                                            ' if FALSE mutation can happen anywhere
                                            ' in the chromosome

Private mMutationMethod         As Integer  ' can be fixed or adaptive
                                            ' See GAMutationType
                                            ' Fixed : the rate in mMutationrate is always taken
                                            ' Adaptive : When the standard deviation of the fitness
                                            ' values stays a number of generations the same (set in
                                            ' mAMRGenerations) then the mutatiorate is increased
                                            ' by 0.01 with a maximum of 1.0
                                            ' If the standard deviation of the fitness values is
                                            ' different for the set number of generations, it is
                                            ' decreased by 0.01, with mMutationRate as minimum

Private mAMRGenerations         As Long     ' number of generations that the standard deviation
                                            ' has to be the same before mutationrate increase
                                            ' for AMR (or different for a decrease)
                                            
Private mSocDisGeneticDiv       As Double   ' Social disaster genetic diversity percentage

Private mSocDisMethod           As Integer  ' Social disaster method (see GASocialDisasterType)
                                            ' Can be packing or Judgement day
                                            
Private mSocDisGenerations      As Long     ' the amount of generations between
                                            ' each check if a social disaster
                                            ' should occur

Private mDescription            As String   ' small description for these settings

Private mPopulationSize         As Long     ' the populationsize as set in the GA control panel

Private mlngSelectedIndex1      As Long     ' The indexes of the two selected chromosomes for
Private mlngSelectedIndex2      As Long     ' reproduction

Private mAMRCounter             As Long     ' counter for AMR when std.dev. is the same
Private mAMRCounterDiff         As Long     ' counter for AMR when std.dev. is different
Private mAMRFitnessStdDev       As Double   ' the value of the std.dev. for AMR


' Counters
Private mCrossoverCounter       As Long     ' counters...just to count howmany times
Private mMutationCounter        As Long     ' something occurs...
Private mRandomOffspringCounter As Long     '
Private mSocialDisasterCounter  As Long     '


' Statistics
Private mblnKeepStatistics      As Boolean  ' keep the statistics or not
Private mStatistics()           As StatisticsType ' the array



'
' Class variables
' used internally
' ++++++++++++++++++++++++++++++++++++++++++++++++

Private mblnSorted              As Boolean  ' = TRUE if the chromosome array is sorted by fitness
                                            ' = FALSE when the array has to be sorted because a chromosome
                                            '   has changed...
                                            ' This sort is necessary to determine the best (lowest) and worst
                                            ' (highest) chromosomes (fitness wise).
                                            
Private mblnAllFitnessCalculated As Boolean ' = TRUE all fitnesses have been calculated
                                            ' = FALSE at least one fitness must be recalculated
                                            
Private mSocDisGenCounter       As Long     ' counter for social disaster generations

Private blnCallFromEvaluate     As Boolean  ' used in EVALUATE
                                            ' if a social disaster occured the population has to be
                                            ' re-evaluated. The sub evaluate calls itself
                                            ' but if the user has set the generation-counter
                                            ' for social disasters to 1, an endless loop (not exactly
                                            ' endless because an out-of-stack error will end it eventually)
                                            ' occurs. This boolean makes it possible to jump
                                            ' out
                                                  
Private mintLongActualLength    As Integer  ' The calculated actual length of a long
                                            ' see the constant cLongMaxLength
                                                  
Private mintDoubleActualLength  As Integer  ' The calculated actual length of a double
                                            ' see the constant cDoubleMaxLength
                                                  



' -----------------------------------------------------------------
' Properties
' -----------------------------------------------------------------

' howmany chromosomes are there
Public Property Get PopulationCount() As Long
    PopulationCount = LngNull(UBound(Chromosome())) + 1
End Property

' the type of chromosome used, defined in GAEncodingType
Public Property Get ChromosomeType() As Integer
    ChromosomeType = mChromosomeType
End Property

Public Property Let ChromosomeType(ByVal vNewValue As Integer)
    mChromosomeType = vNewValue
End Property

' howmany genes are there in a chromosome
Public Property Get GenesPerChromosome() As Integer
    GenesPerChromosome = mGenesPerChromosome
End Property

Public Property Let GenesPerChromosome(ByVal vNewValue As Integer)
    mGenesPerChromosome = vNewValue
End Property

' howmany characters is one BINARY gene (when encodingtype = binary)
Public Property Get BinaryGeneLength() As Integer
    BinaryGeneLength = mBinaryGeneLength
End Property

Public Property Let BinaryGeneLength(ByVal vNewValue As Integer)
    mBinaryGeneLength = vNewValue
End Property

' howmany characters is one ALPHABETIC gene (when encodingtype = alphabetic)
Public Property Get AplhabeticGeneLength() As Integer
    AplhabeticGeneLength = mAlphabeticGeneLength
End Property

Public Property Let AplhabeticGeneLength(ByVal vNewValue As Integer)
    mAlphabeticGeneLength = vNewValue
End Property

' what is the maximumvalue of a long numerical gene (when encodingtype = long numbers)
Public Property Get LongGeneMaxValue() As Long
    LongGeneMaxValue = mLongGeneMaxValue
End Property

Public Property Let LongGeneMaxValue(ByVal vNewValue As Long)
    mLongGeneMaxValue = vNewValue
End Property

' what is the minimumvalue of a long numerical gene (when encodingtype = long numbers)
Public Property Get LongGeneMinValue() As Long
    LongGeneMinValue = mLongGeneMinValue
End Property

Public Property Let LongGeneMinValue(ByVal vNewValue As Long)
    mLongGeneMinValue = vNewValue
End Property

' what is the minimumvalue of a double numerical gene (when encodingtype = double numbers)
Public Property Get DoubleGeneMinValue() As Double
    DoubleGeneMinValue = mDoubleGeneMinValue
End Property

Public Property Let DoubleGeneMinValue(ByVal vNewValue As Double)
    mDoubleGeneMinValue = vNewValue
End Property

' what is the maximumvalue of a double numerical gene (when encodingtype = double numbers)
Public Property Get DoubleGeneMaxValue() As Double
    DoubleGeneMaxValue = mDoubleGeneMaxValue
End Property

Public Property Let DoubleGeneMaxValue(ByVal vNewValue As Double)
    mDoubleGeneMaxValue = vNewValue
End Property

' Selectionmethod. Range, roulette wheel or tournament
Public Property Get SelectionMethod() As Integer
    SelectionMethod = mSelectionMethod
End Property

Public Property Let SelectionMethod(ByVal vNewValue As Integer)
    mSelectionMethod = vNewValue
End Property

' the size of the selection pool for tournament selection
Public Property Get TournamentSize() As Long
    TournamentSize = mTournamentSize
End Property

Public Property Let TournamentSize(ByVal vNewValue As Long)
    mTournamentSize = vNewValue
End Property

' the highest Fitness score in the current population = WORST
Public Property Get FitnessHighest() As Double
    If mblnSorted = False Then
        Call QuickSortFitness(0, (PopulationCount - 1))
    End If
    FitnessHighest = Chromosome(PopulationCount - 1).Fitness
End Property

' the lowest Fitness score in the current population = BEST
Public Property Get FitnessLowest() As Double
    If mblnSorted = False Then
        Call QuickSortFitness(0, (PopulationCount - 1))
    End If
    FitnessLowest = Chromosome(0).Fitness
End Property

' the sum of all Fitness scores in the current population
Public Property Get FitnessSum() As Double
    
    Dim lngloop                 As Long

    Dim dblHelp                 As Double
    
    dblHelp = 0

    For lngloop = 0 To (PopulationCount - 1)
        dblHelp = dblHelp + Abs(Chromosome(lngloop).Fitness)
    Next lngloop

    FitnessSum = dblHelp

End Property

' The index of the first selected chromosome for reproduction
Public Property Get SelectedChromosomeIndex1() As Long
    SelectedChromosomeIndex1 = mlngSelectedIndex1
End Property

Public Property Let SelectedChromosomeIndex1(ByVal vNewValue As Long)
    mlngSelectedIndex1 = vNewValue
End Property

' The index of the second selected chromosome for reproduction
Public Property Get SelectedChromosomeIndex2() As Long
    SelectedChromosomeIndex2 = mlngSelectedIndex2
End Property

Public Property Let SelectedChromosomeIndex2(ByVal vNewValue As Long)
    mlngSelectedIndex2 = vNewValue
End Property

' the corssoverrate
Public Property Get CrossoverRate() As Double
    CrossoverRate = mCrossoverRate
End Property

Public Property Let CrossoverRate(ByVal vNewValue As Double)
    mCrossoverRate = vNewValue
End Property

' the mutationrate - for fixed or startvalue for adaptive
Public Property Get MutationRate() As Double
    MutationRate = mMutationRate
End Property

Public Property Let MutationRate(ByVal vNewValue As Double)
    mMutationRate = vNewValue
End Property

' Reproductionmethod. replace weakest, replace random or replace parents
Public Property Get ReproductionMethod() As Integer
    ReproductionMethod = mReproductionMethod
End Property

Public Property Let ReproductionMethod(ByVal vNewValue As Integer)
    mReproductionMethod = vNewValue
End Property

' Do we crossover on a full gene or anywhere in the chromosome
Public Property Let CrossoverFullGene(ByVal vNewValue As Boolean)
    mCrossoverFullGenes = vNewValue
End Property

Public Property Get CrossoverFullGene() As Boolean
    CrossoverFullGene = mCrossoverFullGenes
End Property

' Test both chromos before crossover for equality, if equal replace one
Public Property Let RandomOffspringGeneration(ByVal vNewValue As Boolean)
    mRandomOffspringGeneration = vNewValue
End Property

Public Property Get RandomOffspringGeneration() As Boolean
    RandomOffspringGeneration = mRandomOffspringGeneration
End Property

' Crossovermethod. one or two point, uniform or half uniform
Public Property Get CrossoverMethod() As Integer
    CrossoverMethod = mCrossoverMethod
End Property

Public Property Let CrossoverMethod(ByVal vNewValue As Integer)
    mCrossoverMethod = vNewValue
End Property

' Do we mutate on a full gene or anywhere in the chromosome
Public Property Let MutateFullGene(ByVal vNewValue As Boolean)
    mMutateFullGenes = vNewValue
End Property

Public Property Get MutateFullGene() As Boolean
    MutateFullGene = mMutateFullGenes
End Property

Public Property Get MeanAverage() As Double
    If PopulationCount <> 0 Then
        MeanAverage = FitnessSum / PopulationCount
    Else
        MeanAverage = 0
    End If
End Property

' the mutationmethod, fixed or adaptive
Public Property Get MutationMethod() As Integer
    MutationMethod = mMutationMethod
End Property

Public Property Let MutationMethod(ByVal vNewValue As Integer)
    mMutationMethod = vNewValue
End Property

' the actual mutationrate - for fixed or startvalue for adaptive
Public Property Get ActualMutationRate() As Double
    ActualMutationRate = mActualMutationRate
End Property

' AMR generations
Public Property Get AMRGenerations() As Long
    AMRGenerations = mAMRGenerations
End Property

Public Property Let AMRGenerations(ByVal vNewValue As Long)
    mAMRGenerations = vNewValue
End Property

' Long/double encoding bitlike mutation or not
Public Property Let MutationBitlikeLongDouble(ByVal vNewValue As Boolean)
    mMutationBitlikeLongDouble = vNewValue
End Property

Public Property Get MutationBitlikeLongDouble() As Boolean
    MutationBitlikeLongDouble = mMutationBitlikeLongDouble
End Property

' Long/Double bitlike mutation
Public Property Get MutationBitlikePercentage() As Double
    MutationBitlikePercentage = mMutationBitlikePercentage
End Property

Public Property Let MutationBitlikePercentage(ByVal vNewValue As Double)
    mMutationBitlikePercentage = vNewValue
End Property

' Social disaster genetic diversity
Public Property Get SocialDisasterDiversity() As Double
    SocialDisasterDiversity = mSocDisGeneticDiv
End Property

Public Property Let SocialDisasterDiversity(ByVal vNewValue As Double)
    mSocDisGeneticDiv = vNewValue
End Property

' Social disaster method
Public Property Get SocialDisasterMethod() As Integer
    SocialDisasterMethod = mSocDisMethod
End Property

Public Property Let SocialDisasterMethod(ByVal vNewValue As Integer)
    mSocDisMethod = vNewValue
End Property

' the amount of generations between each check for an eventual social disaster
Public Property Get SocialDisasterGenerations() As Long
    SocialDisasterGenerations = mSocDisGenerations
End Property

Public Property Let SocialDisasterGenerations(ByVal vNewValue As Long)
    mSocDisGenerations = vNewValue
End Property

' Description
Public Property Get Description() As String
    Description = mDescription
End Property

Public Property Let Description(ByVal vNewValue As String)
    mDescription = vNewValue
End Property

' Version
Public Property Get Version() As String
    Version = cVersion
End Property

' PopulationSize as set in the GA control panel
Public Property Get PopulationSize() As Long
    PopulationSize = mPopulationSize
End Property

Public Property Let PopulationSize(ByVal vNewValue As Long)
    mPopulationSize = vNewValue
End Property

'
' -----------------------------------------------------

' Counters
Public Property Get CounterCrossovers() As Long
    CounterCrossovers = mCrossoverCounter
End Property

Public Property Get CounterMutations() As Long
    CounterMutations = mMutationCounter
End Property

Public Property Get CounterRandomOffsprings() As Long
    CounterRandomOffsprings = mRandomOffspringCounter
End Property

Public Property Get CounterDisasters() As Long
    CounterDisasters = mSocialDisasterCounter
End Property

' Generation
Public Property Get Generation() As Long
    Generation = mGeneration
End Property

' Keep statistics info
Public Property Let KeepStatistics(ByVal vNewValue As Boolean)
    mblnKeepStatistics = vNewValue
End Property

Public Property Get KeepStatistics() As Boolean
    KeepStatistics = mblnKeepStatistics
End Property

' Statistics - lowest fitness
Public Property Get StatisticsLowestFitness(ByVal lngGeneration As Long) As Double
    StatisticsLowestFitness = mStatistics(lngGeneration).LowestFitness
End Property

' Statistics - Highest fitness
Public Property Get StatisticsHighestFitness(ByVal lngGeneration As Long) As Double
    StatisticsHighestFitness = mStatistics(lngGeneration).HighestFitness
End Property

' Statistics - Highest fitness
Public Property Get StatisticsStandardDeviation(ByVal lngGeneration As Long) As Double
    StatisticsStandardDeviation = mStatistics(lngGeneration).StandardDeviation
End Property

' Statistics - Social diverscity
Public Property Get StatisticsSocialDivercity(ByVal lngGeneration As Long) As Long
    StatisticsSocialDivercity = mStatistics(lngGeneration).SocialDivercity
End Property

' Statistics - Selection method
Public Property Get StatisticsSelectionMethod(ByVal lngGeneration As Long) As Integer
    StatisticsSelectionMethod = mStatistics(lngGeneration).SelectionMethod
End Property

' Statistics - RouletteWheelOverflow
Public Property Get StatisticsRouletteWheelOverflow(ByVal lngGeneration As Long) As Boolean
    StatisticsRouletteWheelOverflow = mStatistics(lngGeneration).RouletteWheelOverflow
End Property

' Statistics - MutationRate
Public Property Get StatisticsMutationRate(ByVal lngGeneration As Long) As Double
    StatisticsMutationRate = mStatistics(lngGeneration).MutationRate
End Property

' Statistics - Disaster generation counter
Public Property Get StatisticsDisasterGenerationCounter(ByVal lngGeneration As Long) As Long
    StatisticsDisasterGenerationCounter = mStatistics(lngGeneration).SocialDisasterGenCounter
End Property

' Statistics - DisasterOccured
Public Property Get StatisticsDisasterOccured(ByVal lngGeneration As Long) As Boolean
    StatisticsDisasterOccured = mStatistics(lngGeneration).SocialDisasterOccured
End Property

' Statistics - Bestchromosome
Public Property Get StatisticsBestChromosome(ByVal lngGeneration As Long) As String
    StatisticsBestChromosome = mStatistics(lngGeneration).BestChromosome
End Property



' -----------------------------------------------------------------
' Class Procedures
' -----------------------------------------------------------------


Private Sub Class_Initialize()
    '
    ' What is the system decimal-symbol
    ' Used for localization on non-english (or different country-settings)
    ' OS versions. The decimal-point-symbol can clash with the VB comma-symbol
    ' leading to errors when dealing with doubles.
    strCurrentsystemDecimalSeparator = Trim$(Format$("0.00", "#.##"))
    
    mGeneration = 0
    blnCallFromEvaluate = False
    
    
    ' default values for the properties
    ' ---------------------------------
    
    ' Default selectionmethod = Rank
    SelectionMethod = GASelectRank

    ' default reproductionmethod = replace weakest
    ReproductionMethod = GAReproductionReplaceWeakest

    ' default CrossoverRate
    CrossoverRate = 0.7
    
    ' default Mutationrate
    MutationRate = 0.05
    
    ' Tournament size
    TournamentSize = 5
    
    ' crossoverfullegene
    CrossoverFullGene = False
    
    ' Crossovermethode
    CrossoverMethod = GACrossoverOnePoint
    
    ' RandomOffspringGeneration
    RandomOffspringGeneration = True
    
    ' mutatefullgene
    MutateFullGene = False
    
    ' MutationMethod
    MutationMethod = GAMutationRateFixed
    
    ' AMR generations
    AMRGenerations = 10
    
    ' bitlike mutation for long or double
    MutationBitlikeLongDouble = False
    
    ' percentage af maximum for the random value for bitlike mutation
    MutationBitlikePercentage = 10
    
    ' Social desaster
    SocialDisasterDiversity = 0
    
    ' social disaster method
    SocialDisasterMethod = GASocialDisasterJudgementDay
    
    ' amount of generations between each social disaster check
    SocialDisasterGenerations = 25
    
    ' nothing is calculated
    mblnAllFitnessCalculated = False
    
    ' nothing is sorted
    mblnSorted = False
    
    ' do not keep statistics
    mblnKeepStatistics = False
    
    ' Clear the counters
    Call ClearCounters
    
End Sub

Public Sub CREATEPOPULATION(ByVal lngPopulationTotal As Long)
    '
    ' creates the initial population
    ' lngPopulationTotal is the amount of chromosomes wanted
    '
    On Local Error GoTo errorhandler
    
    Dim lngX                    As Long
    
    ' clear the chromosome array
    Call Clear
    
    ' create population
    For lngX = 0 To (lngPopulationTotal - 1)
        Call AddChromosome(lngX)
    Next lngX
    
    ' reset counters
    Call ClearCounters
    
    ' set the actual mutationrate to the fixed mutationrate
    mActualMutationRate = mMutationRate
    
    ' set generation to 1
    mGeneration = 1
    
    ' social disaster generation counter
    mSocDisGenCounter = 0
    
Exit Sub

errorhandler:

    RaiseEvent GAError(LngNull(Err.Number), "Error in CREATEPOPULATION ! " & Err.Description)
    
End Sub

Public Sub Clear()
    '
    ' Clear the chromosome array
    '
    ReDim Chromosome(0)

    mblnSorted = False
    mblnAllFitnessCalculated = False
    
End Sub

Public Sub ClearAllFitness()
    '
    ' sets all the chromosomes' fitnesses to a high number
    ' this forces all chromosomes to be re-evaluated the next evaluation
    ' sequence.
    ' NOT called from within the class, must be called
    ' from the main generation-loop should it be necessary
    
    Dim lngloop                 As Long


    For lngloop = 0 To (PopulationCount - 1)
        Chromosome(lngloop).Fitness = 1E+300
        Chromosome(lngloop).RecalculateFitness = True
    Next lngloop
    
    
End Sub

Private Function AddChromosome(ByVal lngChromoNbr As Long)
    '
    ' Add a new individual chromosome to the population
    ' Called from CreatePopulation
    '
    On Local Error GoTo errorhandler
    
    
    Dim NewChromosome           As ChromosomeindividualType
    
    ReDim Preserve Chromosome(lngChromoNbr)

    NewChromosome = CreateRandomChromosome(1)
    
    ReDim Preserve Chromosome(lngChromoNbr)
    
    Chromosome(lngChromoNbr) = NewChromosome
    
    ' this chromosome did not yet went through the fitness test,
    ' set it's fitness to a very high ( = bad) number
    Chromosome(lngChromoNbr).Fitness = 1E+300
    Chromosome(lngChromoNbr).RecalculateFitness = True
    
    mblnAllFitnessCalculated = False
    mblnSorted = False
    
Exit Function

errorhandler:

    RaiseEvent GAError(LngNull(Err.Number), "Error in AddChromosome ! " & Err.Description)
    
End Function

Private Function CreateRandomChromosome(ByVal intOrigin As Integer) As ChromosomeindividualType
    '
    ' Returns a random chromosome
    '
    ' intOrigin : from where is this function called
    '     1     Createpoplation                         GANewChromosomeCreatePopulation
    '     2     Selection (Random offspring Generation) GANewChromosomeROG
    '     3     Social disaster                         GANewChromosomeSocialDisaster

    Dim intGeneCounter          As Integer
    
    Dim strNewGenes()           As String
    Dim lngNewGenes()           As Long
    Dim dblNewGenes()           As Double
    
    
    
    ReDim strNewGenes(0)
    ReDim lngNewGenes(0)
    ReDim dblNewGenes(0)
    
    
    For intGeneCounter = 0 To (mGenesPerChromosome - 1)
        
        Select Case mChromosomeType
            Case GAEncodingBinary  ' Binarystring
                ReDim Preserve strNewGenes(intGeneCounter)
                strNewGenes(intGeneCounter) = RandomBinaryGene
                
            Case GAEncodingAlphabetic ' alphabetic characters
                ReDim Preserve strNewGenes(intGeneCounter)
                strNewGenes(intGeneCounter) = RandomAlphabeticGene
                
            Case GAEncodingLongNbr  ' Long numbers
                ReDim Preserve lngNewGenes(intGeneCounter)
                lngNewGenes(intGeneCounter) = RandomLongGene
                
            Case GAEncodingDouble   ' Double numbers (real numbers)
                ReDim Preserve dblNewGenes(intGeneCounter)
                dblNewGenes(intGeneCounter) = RandomDoubleGene
                
        End Select
    
    Next intGeneCounter
    
    ' raise the newchromosome-event, allowing the main usercode
    ' to override the newly created chromosome and use a custom-made
    ' one
    RaiseEvent NewChromosome(strNewGenes(), lngNewGenes(), dblNewGenes(), intOrigin)

    
    ' insert the new chromosome in the array
    ReDim CreateRandomChromosome.Genes(0)
    For intGeneCounter = 0 To (mGenesPerChromosome - 1)
        ReDim Preserve CreateRandomChromosome.Genes(intGeneCounter)
        Select Case mChromosomeType
            Case GAEncodingBinary  ' Binarystring
                CreateRandomChromosome.Genes(intGeneCounter).GeneString = strNewGenes(intGeneCounter)
                
            Case GAEncodingAlphabetic ' alphabetic characters
                CreateRandomChromosome.Genes(intGeneCounter).GeneString = strNewGenes(intGeneCounter)
                
            Case GAEncodingLongNbr  ' Long numbers
                CreateRandomChromosome.Genes(intGeneCounter).GeneLong = lngNewGenes(intGeneCounter)
                
            Case GAEncodingDouble   ' Double numbers (real numbers)
                CreateRandomChromosome.Genes(intGeneCounter).GeneDouble = dblNewGenes(intGeneCounter)
                
        End Select
    Next intGeneCounter
    
    CreateRandomChromosome.RecalculateFitness = True
    
End Function

Private Function RandomBinaryGene() As String
    '
    ' Returns a random binary gene
    '
    Dim strGene                 As String
    
    Dim intBitCounter           As Integer
    
    strGene = Space$(mBinaryGeneLength)
    Randomize (Sin(Timer) * Timer - Rnd * Timer)
    For intBitCounter = 1 To mBinaryGeneLength
        ' randomize
        If Rnd < 0.5 Then
            Mid$(strGene, intBitCounter, 1) = "0"
        Else
            Mid$(strGene, intBitCounter, 1) = "1"
        End If
    Next intBitCounter
    
    ' raise the newgene-event, allowing the main code
    ' to override this random gene with a custom made one
    RaiseEvent NewGeneString(strGene)
    
    RandomBinaryGene = strGene
    
End Function

Private Function RandomAlphabeticGene() As String
    '
    ' Returns a random alphabetic gene
    '
    Dim strGene                 As String
                
    Dim intGene                 As Integer
    Dim intLoop                 As Integer
    
    Randomize (Sin(Timer) * Timer - Rnd * Timer)
    strGene = ""
    
    For intLoop = 1 To mAlphabeticGeneLength
    
        intGene = Int((Rnd * 26) + 1) + 64
    
        strGene = strGene & Chr$(intGene)
    Next intLoop
    
    ' raise the newgene-event, allowing the main code
    ' to override this random gene with a custom made one
    RaiseEvent NewGeneString(strGene)
    
    RandomAlphabeticGene = strGene

End Function

Private Function RandomLongGene() As Long
    '
    ' Returns a random Long number gene
    '
                
    Dim lngGene                 As Long
                
    Randomize (Sin(Timer) * Timer - Rnd * Timer)
    
    lngGene = ((mLongGeneMaxValue - mLongGeneMinValue + 1) * Rnd + mLongGeneMinValue)
    If lngGene > mLongGeneMaxValue Then
        lngGene = mLongGeneMaxValue
    Else
        If lngGene < mLongGeneMinValue Then
            lngGene = mLongGeneMinValue
        End If
    End If
    
    ' raise the newgene-event, allowing the main code
    ' to override this random gene with a custom made one
    RaiseEvent NewGeneLong(lngGene)
    
    RandomLongGene = lngGene
    
End Function

Private Function RandomDoubleGene() As Double
    '
    ' Returns a random double number gene
    '
    Dim dblGene                 As Double
                
    Randomize (Sin(Timer) * Timer - Rnd * Timer)
    
    dblGene = ((mDoubleGeneMaxValue - mDoubleGeneMinValue + 1) * Rnd + mDoubleGeneMinValue)
    
    If dblGene > mDoubleGeneMaxValue Then
        dblGene = mDoubleGeneMaxValue
    Else
        If dblGene < mDoubleGeneMinValue Then
            dblGene = mDoubleGeneMinValue
        End If
    End If
    
    
    ' raise the newgene-event, allowing the main code
    ' to override this random gene with a custom made one
    RaiseEvent NewGeneDouble(dblGene)
        
    RandomDoubleGene = dblGene
    
End Function

Public Sub EVALUATE()
    '
    '
    ' Raises the EvaluateFitness-event allowing the main app to calculate
    ' the fitness for each chromosome
    '
    '
    On Local Error GoTo errorhandler
    
    Dim lngIndex                As Long
    Dim lngStart                As Long
    Dim lngEnd                  As Long
    
    Dim dblFitnessValue         As Double

    Dim dblStdDev               As Double
    
    lngStart = 0
    lngEnd = (PopulationCount - 1)
    
    
    For lngIndex = lngStart To lngEnd
        
        If Chromosome(lngIndex).RecalculateFitness = True Then
        
            dblFitnessValue = Chromosome(lngIndex).Fitness
        
            RaiseEvent EvaluateFitness(lngIndex, dblFitnessValue)
        
            Chromosome(lngIndex).Fitness = dblFitnessValue
            Chromosome(lngIndex).RecalculateFitness = False
    
        End If
    Next lngIndex

    ' the chromosome-array has changed, it has to be sorted
    mblnSorted = False

    ' all fitnesses where calculated
    mblnAllFitnessCalculated = True

    ' standard deviation
    dblStdDev = CalculateStandardDeviation

    ' Statistics
    If mblnKeepStatistics = True Then
        If blnCallFromEvaluate = False Then
            ReDim Preserve mStatistics(Generation)
            mStatistics(Generation).HighestFitness = FitnessHighest
            mStatistics(Generation).LowestFitness = FitnessLowest
            mStatistics(Generation).StandardDeviation = dblStdDev
            mStatistics(Generation).SocialDisasterOccured = False
            mStatistics(Generation).SocialDisasterGenCounter = mSocDisGenCounter
            mStatistics(Generation).BestChromosome = ShowChromosomestring(0, "TRUE")
        End If
    End If

    '
    ' ADAPTIVE MUTATION RATE
    '
    If mMutationMethod = GAMutationRateAdaptive Then
        ' if the stabdard deviation stays the same for
        ' the set number of generations (in
        ' AMRGenerations / mAMRGenerations) then
        ' increase the actualmutationrate with 0.01
        If mAMRFitnessStdDev = dblStdDev Then
            mAMRCounter = mAMRCounter + 1
            mAMRCounterDiff = 0
        Else
            mAMRFitnessStdDev = dblStdDev
            mAMRCounterDiff = mAMRCounterDiff + 1
            mAMRCounter = 0
        End If
    
        If mAMRCounter >= mAMRGenerations Then
            mActualMutationRate = mActualMutationRate + 0.01
            If mActualMutationRate > 1 Then
                mActualMutationRate = 1
            End If
            mAMRCounter = 0
        End If
        
        If mAMRCounterDiff >= mAMRGenerations Then
            mActualMutationRate = mActualMutationRate - 0.01
            If mActualMutationRate < mMutationRate Then
                mActualMutationRate = mMutationRate
            End If
            mAMRCounterDiff = 0
        End If
    End If
    
    ' Statistics
    If mblnKeepStatistics = True Then
        If blnCallFromEvaluate = False Then
            mStatistics(Generation).MutationRate = mActualMutationRate
            mStatistics(Generation).SocialDivercity = GeneticDiversity
        End If
    End If
    
    
    '
    ' SOCIAL DISASTER
    '
    If mSocDisGenCounter >= mSocDisGenerations Then
        If blnCallFromEvaluate = False Then
            Call SocialDisaster
        
            blnCallFromEvaluate = True
            Call EVALUATE
            blnCallFromEvaluate = False
            
            mSocDisGenCounter = 0
            
        End If
        
    End If
    
Exit Sub

errorhandler:

    RaiseEvent GAError(LngNull(Err.Number), "Error in EVALUATE ! " & Err.Description)

End Sub

Private Sub QuickSortFitness(ByVal lngFirst As Long, ByVal lngLast As Long)
    '
    ' Quicksort in order to sort the chromosomes by their fitness.
    '
    '            I got this version of quicksort years ago from
    '            a website (I believe from www.gamedev.net but
    '            I'm not sure). Original code was in C and Quickbasic.
    '            The quickbasic version was rewritten by me
    '            several times over the past years until
    '            the version you see here. I use it in
    '            several of my projects.
    '
    
    Dim lngLow                  As Long
    Dim lngHigh                 As Long
    
    Dim dblMidValue             As Double
    
    Dim HelpChromo              As ChromosomeindividualType
    
    lngLow = lngFirst
    lngHigh = lngLast
    
    ' take the absolute value of fitness
    dblMidValue = Abs(Chromosome((lngFirst + lngLast) \ 2).Fitness)
    Do
        While Abs(Chromosome(lngLow).Fitness) < dblMidValue
            lngLow = lngLow + 1
        Wend
        While Abs(Chromosome(lngHigh).Fitness) > dblMidValue
            lngHigh = lngHigh - 1
        Wend
        If lngLow <= lngHigh Then
            GoSub swap
            lngLow = lngLow + 1
            lngHigh = lngHigh - 1
        End If
    Loop While lngLow <= lngHigh
    If lngFirst < lngHigh Then QuickSortFitness lngFirst, lngHigh
    If lngLow < lngLast Then QuickSortFitness lngLow, lngLast
    
    ' the chromosome-array is sorted
    mblnSorted = True
    
Exit Sub

swap:
    HelpChromo = Chromosome(lngLow)
    Chromosome(lngLow) = Chromosome(lngHigh)
    Chromosome(lngHigh) = HelpChromo
    
Return

End Sub

Public Sub SELECTION(Optional varSelectionMethod As Variant)
    '
    ' Selects two chromosomes for reproduction
    '
    ' the property SelectionMethod is normaly used to specify
    ' the method of selection (range, roulettewheel or tournament)
    ' the optional variant varSelectionMethod can however
    ' be used to specify the selectionmethod, allowing
    ' code that automatically alternates selectionmethods
    '
    '
    '
    '
    On Local Error GoTo errorhandler
    
    Dim intMethod               As Integer
    Dim intX                    As Integer
    Dim intRouletteCounter      As Integer ' howmany times has roulettewheel been spun ?
    
    Dim dblRunningFitness       As Double
    Dim dblHulp                 As Double
    Dim dblChosenFitness        As Double
    
    Dim lngloop                 As Long
    Dim lngHulp                 As Long
    Dim lngChosenIndex          As Long
    Dim lngChromo1              As Long
    Dim lngChromo2              As Long
    
    Dim blnChromosAreIdentic    As Boolean  ' used in random offspring generation
    
    
    
    lngChromo1 = 0
    lngChromo2 = 0
    
    
    If IsMissing(varSelectionMethod) Then
        intMethod = mSelectionMethod
    Else
        intMethod = IntNull(varSelectionMethod)
    End If

    
    ' Statistics
    If mblnKeepStatistics = True Then
        mStatistics(Generation).SelectionMethod = intMethod
        mStatistics(Generation).RouletteWheelOverflow = False
    End If


    ' Sort the chromosome array ?
    If mblnSorted = False Then
        Call QuickSortFitness(0, (PopulationCount - 1))
    End If

    Do
        Select Case intMethod
            Case GASelectRank
                ' Select the parents based on rank.
                GoSub Rank
            
            Case GASelectRouletteWheel
                ' select the parents based on a weighted roulette wheel
                ' (the weight being the sort order). The sort is by fitness
                ' so a lower chromosome index is a better one.
                GoSub RouletteWheel
                If intRouletteCounter > cRouletteWheelSpinMax Then
                    GoSub Rank
    
                    ' Statistics
                    If mblnKeepStatistics = True Then
                        mStatistics(Generation).RouletteWheelOverflow = True
                    End If
                
                End If
                
            Case GASelectTournament
                ' Organize a tournament. Select 'TournamentSize' members randomly out of the population.
                ' The fitttest of this group is selected for reproduction.
                ' Do this a second time to obtain both parents
                GoSub Tournament
                
        End Select
    Loop Until lngChromo1 <> lngChromo2 ' make sure both parents are different chromosomes

    mlngSelectedIndex1 = lngChromo1
    mlngSelectedIndex2 = lngChromo2


    ' --------------------------------------
    ' RandomOffspringGeneration
    ' --------------------------------------
    '
    If mRandomOffspringGeneration = True Then
        GoSub GenerateARandomOffspring
        
    End If


Exit Sub

'
' -----------------------------------------------------------
' Rank selection
' -----------------------------------------------------------
'
Rank:
    '
    ' All individuals are sorted by their fitness, two
    ' of them are chosen randomly
    '
    Do
        For intX = 1 To 2

            lngHulp = Int((Rnd * (PopulationCount)))
            If lngHulp > (PopulationCount - 1) Then
                lngHulp = PopulationCount - 1
            End If

            If intX = 1 Then
                lngChromo1 = lngHulp
            Else
                lngChromo2 = lngHulp
            End If

        Next intX
    Loop Until lngChromo1 <> lngChromo2
    
Return

'
' -----------------------------------------------------------
' Spin the Roulettewheel
' -----------------------------------------------------------
'
RouletteWheel:
    ' A roulette wheel uses an imaginary wheel and creates
    ' pies of varying sizes for each member. A standard (or 'normal')
    ' roulette wheel creates pie-sizes related to the fitness of
    ' each member.
    ' The positive side of this is that roulette wheel tends to
    ' attain convergence very quickly.
    ' The negative side is that the normal roulette wheel tends
    ' to attain convergence very quickly... leading to local optima.
    ' The reason for this is that roulette wheel cannot handle
    ' huge fitness differences correctly.
    '
    ' To solve this problem the fitness values are weighted. This means
    ' the size of each 'pie' is not directly related to the size of
    ' the fitnessscore, but more to the position within the sorted
    ' fitnessscores...
    '
    ' The pie-sizes are chosen by position in a fitness-sorted population. So
    ' for 100 members, sorted by fitness from 0 (fittest) to 99 (worst) :
    ' individual 0 gets a pie of 100, individual 1 gets a pie of 99, 3 of 98... until
    ' element 99 gets a pie of 1. In this way the repartition is smoother
    '
    ' This can be done easily with a running sum, but I had trouble
    ' with problems generating huge differences in fitnessscores..
    ' So I used a different approach : filling piestart and pieend
    ' Later I found what the problem was and how to solve it, but this
    ' code was allready done and worked flawlessly, so I decided
    ' to keep it this way...
    '
    ' First, create the pies of the wheel
    ' fill in the PieStart and PieEnd fields
    ' for every chromosome. Chromosomes with fitness score closer to 0
    ' get a bigger piece than those with a higher fitness
    ' Since they are sorted by fitness, their index is a measurement
    ' for the pie segment. Lower index means a bigger pie
    
    dblRunningFitness = 0
    dblHulp = PopulationCount
    
    For lngloop = 0 To (PopulationCount - 1)
        dblRunningFitness = dblRunningFitness + 1
        Chromosome(lngloop).PiePieceStart = dblRunningFitness
        dblRunningFitness = dblRunningFitness + dblHulp
        
        Chromosome(lngloop).PiePieceEnd = dblRunningFitness
    
        dblHulp = dblHulp - 1
    Next lngloop
    
    '
    ' Now spin the wheel
    '
    intRouletteCounter = 0
    Do
        For intX = 1 To 2
            ' witch chromosome is the lukcy one ?
            dblHulp = ((Rnd * Abs(Int(dblRunningFitness))) + 1)
            If dblHulp > Chromosome(PopulationCount - 1).PiePieceEnd Then
                dblHulp = Chromosome(PopulationCount - 1).PiePieceEnd
            End If
            
            For lngloop = 0 To (PopulationCount - 1)
        
                If dblHulp >= Chromosome(lngloop).PiePieceStart And dblHulp <= Chromosome(lngloop).PiePieceEnd Then
                    If intX = 1 Then
                        lngChromo1 = lngloop
                    Else
                        lngChromo2 = lngloop
                    End If
                    Exit For
                    
                End If
            Next lngloop
        
        Next intX
        '
        ' As stated, Roulette wheel can converge quickly, but is prone
        ' to arrive quickly at local optima if many chromosomes start to look alike
        ' and have the same fitnessscore.
        ' In an attempt to avoid local optima a counter is used to track
        ' howmany times same fitnessscored-chromosomes are chosen.
        ' If this maximum is reached then jump out of roulette wheel
        ' doubles.aowmany times same fitnme f    
     ' Lo't
Moefault values for bubles.
    strCurrentsrles.
    I1 intX
2dT
                G     dblRunningFitnes    strCurrentsrles.
    I1 intX
2dT
                G    s f ached thenAlphabetic
    
    strGene = Spac'            several of my projects.
    '
R$ondomOffsprings() A     he fitn              G    s 
Rof my projects.
    '
R$mwromoCount    If mMuuuuuuuuu   projects.
   '
ssovrt             
      
 DingFitnes    strCurrelect Chromos  '
'
ssovrtW ached thenA  several of my projects.
    '
     he fitn creates pie-sizes related to the 
Rof my projrhromoNbr)
                    )
                    Else
          attain converg   '
R$m1)
     ncodin se

    '            The quickbasic versionitness-sorer
    '
    ' This  CrossoverMethod =MUTATION       If dbl        The quickbasic versiFcl optima if man   
<   
  '
  ic 25
  =drer= mSoci=(r= mSoc  '
  'basic (lngLo
    '            The qui   
  'Currentsrles.
  cial2rt il    The qui   
  'Currentsrles.
  cial2rt il    The qui   
  'Currentsrles.
  cial2rasicleasic (lngLo
void local op       Ls   itnwmany times same fitnme f    
     ' LCalgcLCalgcLCalgcLCalgcLCalgcLCalgcLCalgctart And dblHulp <= Chra
  cial2rasiclessso>mes same fitnme f    
     ' LCalgcLCssss  The<=              G    s f a---------fitneop
       2 versio> inE   I1 intX
al2rasicle  'CurxCounterDiff = 0
        End If
    End If
Ls   itnwmany times same fop
s stlng"0.lgcLCalgcLCalgcu but more to the
  =dheaso             CreateRandomChromosome.Genes(intGeneCounter).Genenot handle
    ' huge fitttttttttttttt' Property

 ! "m G    s f a---------fitneop
       2 versio> rrentsrles.
dle
    ' huge fittttttness =Soc  '
 nr
    ead(o specify the Ort il    The quOssove fitttttttttttttt' Property

 or=:lMuuuuuuuuu   prs
    ' the sRt----fitneop
       2 versio> inE   I1 intX
al2rasicle  'CurxCounmveop'CurxCoGoSub Rank
            
            CP$       CP$           a--fitnnd If
  a---------fitneop StatisticsSocialllllllllllllllllllll
                 a--fit-------------If
  gtX
al          <ndomly out of theop
       2 versio>
 e chosr fitness
    'srles.
Moefault vaomize (cify tl
  srles.
dle
  neo

 bigge
ene
 e cl          <ndom---If
  gtX
al         
    <ndomly out of theop
       2 versio>
 e chosr fitness
    'srles.
Moefde
    ' to override tssValue
            Chromosome(lngIndex).RecalculateFitnewf'                              l2rair2itn'y    Chromosome(lngIndex).PvarSelecX2tart 
 
dle
  neo

 bigge
ene
 e'TournamentSbs(ChromgX2tart8e GAEncodingBinary  ' Binarystring
    (y
    ( lngloop
 ess
    'srles.
Mlg
    RaiseEvent NewCheystring
    (y
    ( lngloop) As      ' doubles.ao tssValue
          Ch prone
 G,
 Mlg
 e
dle
  DcRtness)
  lllllllllllllllll
ingcbigge
ene
 e'TournamentSbs(ChromgX2tart8e GAEncodingBinary  'opertyValu codingBinary  'opertyValug
    (y
    ( lngloop
 ess
    's      As Integer
    Dim intRouletteCounter      As Integer ' howmany timesLCounter      As Integer ' howmany timesLCounter      As Integer  srles.
dlp-If
s
    's      AsfS   moother
  esLCounter      Counter      As unter    Cm  As Integ   As Intengloop
                    Else
               itness
    'srles.
Moefau    As Integer ' howmany timesLCounter      As Integer  srles.
dlp-If
s
    's      AsfS   moother
  esLCounter      Counter      As unted  AsfS   moother
domChromosome.Genme fitnmmmm.Upe
e
 tyValug
    (y
    ( lngloop
 es        a--fit--ssoverAug
    hDp = ger rAug
    hDp  p                Else
               itness
    'srles.
Moefau    As Integer 'enes(intr
i Ins(intr
i Ins(intr
i Ins(intr
i  As Integd    he fitn                      '
Rr
i Ins(intr
omedr  As Chromosomeindue A hDp  p      <ialgcu bules.
Moefaf
  gtX
al         hod
    Else
        in" Integ   As Intengloop
                    Else
                 o    Ellg
 e
dlepp Ins(intr
i InsulateFitnewfc            2 = lngChro<    vt) to 99  As IntegalculateFi6hro<    vt) to 99el    The qui   
  'Currentsrles.
  cial2rt   El(      Cr
i Insul times same fitnme f   gChHis        Else
this maximum is reached then jumis        Else
this max reached then juortFitness(0, (PopulVod then juortFitnessdblHulp = oop
        juortFitnngLow)
    Chromosome(lngLow) = Chromosome(lTrssdblH hDp  p                Else
               itness
    'srles.
Moefau    As ILverge quickl
  cial2rt   Elosome(lTrssdblH hDss
    'srles.
Moefau    As ILverge quiu    t ucial2bules.
Moefaf
  gtX
al          (u t ucialla (Po ' StatisticsLu          Else
    S   '
   cial2rt verge quiuElse
this max reached then juortFitness(0, (PopulVod theiption(ByVal vNewValue As String)
    mDescription = vNewValue
EndblH hIf

            If intXctheLlng)
    mDescription =  wchromosome-event,   (y
hlvNewValue)
  f Sfaf
  gtX
al          (u t ucialla (Po ' Statistic(rtheLurCounters
 verOnePoint
    
YInteger  srles.
dl unter    Cm  As Integ   As Intengloop
                    Els     Chromosome(lnme(lnme(lnme(lnme(lnme(lnme(lnme(ln
  RrCounters
 verOnePointeCoss
    
        dblHulp = dblHulp - 1
    Next lngloop
    NSheLurCounters
ntege oop
        e oop
    atiingcbigge
eC6=If
    End If

    '
     wo 99eeeeeee$arEnd If
ounters
ntege oop
 Counters
nt srles.
dC6=If
    End If

   mEC6=If
u           se.
dC6=If
    E
dC6=If
aInes(intGeneCounter).GeneString = strNewGenes(intGenebse.
dC6=If
    enerlHulp - 1
    Next lnglooe-evener).GeneString = strNewGenes(intGenebse.
dC6e     se.
dC6=If
    strNewGSs StatisticsLu  (ng     ThtXctheLlng)
    k    hod
    tatis Th        ' Do this a second time to obtain both parents
                GoSubS2Integer ' howmany twGe-aInes(iiiiiiiiise.
di 
    
   dblHulp - 1
    Nex           GoSu   meblHulp - 1
   m9Sers
nGe-aElse
los-eion As Lon based on r GoSu  yerO   ' The    urnameOr lngu
      y timesLCounter      Asa ' Do Ni(u t ucialla  GoSu  yerAs es(intGeneCouuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.C6=I     ' The fitttest of this group is selected fos<DneCouion
    For lngX = 0 To Genebse.
dC6e p     dbis selected fd
    tatoup iuuuuuuuer    Cm  As Integ   As Iger          yo
   m=Er chanectly rela     ' Do this   Cm  As I quickbasic versionitness-sorer
    '
    ' This  Crossoverbis selei(fsnes(intGeneCounter).GeneString = strNewGenes(intGenebse.
dC6=If
    enerlHulp - os   Randomize (Sin(nk
    Genes((enerp>= m     o   0  (y

    Genes((enennnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn6=IfSnnnnnnnnnnnnnnne-entGeneCounter).GeneString = ulp eneStringd Quickba
Moefaf
  gtX
al         hod
    Else
        in" Integ   As Intenis Ptttt strNewGenes(intGenebse.
dC6e       e oop
    aPaginuuuy    tGoSub Rank
    
        eLl  ' -----Ctionehank
    
     
     ' D?K2od) Then
       Lwfc nnnnnn    ntGenrystring
    (y
   Integd    he fitn         r  (y
   Integd    he fitn on GoSu   mebStr
i innnnnnnerlHulp - os   Randomi               Else
       ebse.
dC6eoabett - 1) 
  (
       e
            CP$     ing = - os   Randomi   tw    nn    ntGenrystring
    (y
   Integd    he fitn on GoSu   mebStr
i innnnnnnerlHulp - os   Randomi               Else
       ebse.
dC6eoabett - 1) 
  (
       e
          NsAMRCounterDiff = mAMRCounterDiff + 1
            mAMRCounter = 0
        End If
    
        If mAMRCounter >= mAMRGenerations Then
            mActualMutationRate = mActualMutationRate Aau   Lmore m www.gamedev.net tctFitnesromos.t      ration).SocialDimActustualMutationRate =override thivverride thivverriD  Integd  d  CP$ = m----Ct   ' default value 2'Cu IntVoL  
 thivverriD  Integd  d  CP$ = m----Ct   ' d
   rinnnnnnnnnnnverriD  In    Chromosome(lngLow) = Chhhhhhhhhhhhhhhhh stlngpngnnnnnuoperty

 or=:lMuuuuuuuuu   prs
pngnnnnnuoperty   
nnnerlHulp - os   Rannnnnnnnnui .gamedev.net tctF(operty   
nnnerlHulp - os  '(uuuuuuu= m----Ct   ' d
   rinnnnnnnnnnnverr not suGoSu  y blHulpuickba
Moehhhhhhhh  
nndtfd
    tat  ' '(uuuuuuu= m----Ct   ' d
   rinnnnnn   uuu= m----Ct   gnnnntengloop
sl       'enes(intr
i Ins(introoooooooooooAsfS   r<2222222Xigg--Ct   ' t d
   ter S.nglooehhhhhhhm Helps   RannnnAelps   RannnnAelps   RannnnAelps LCalgcLCalgcLCalgcLCalgcLChs   Rannnn ebse.
dC6eoariD  '(uuuuuuu=Lter S.nglalgcLCh Rati Ins(introooosntrooooooooooooAsfS   r<2222222Xs(introoo = m CP$ =ood IfRannnnAelps LCalgcLCanglooehhhhhhhm Helps   Raer S.ntring(r
    rotionehank
    
     
    CreateRandomChromo
    MutationRnAelps  annnd$W  ncodin pngnnnnhh  
nndtfd
  is groupVirectlydonter , n on GoSu   mebStnnAelpDu   prs
pngnnnnnuoperty  CalgcL  
     
    CreateRandomChromo
    MutationRa          
a custom made omebStr
i innnnnnnerlHulp - os   Randomi              m=Er chanLCalgcLCal  Crenk
    ynnnnnerlHulp - os  5Ial vNewValue As String)
    mDescription = vNeon = vcDisGonnn   uuu= m----Ch LCalgcLCangloRunningFitd
    mblnAllFitn  (y
    ( lnglooNtom made one
oo------------------As IntenrNe tctFia,or chanLCalgcLCal  Crenk
    ynnnnt e
dlepp Ins(intrH           m=Er chanLCalgcLCal  Crenk
 Raa22222Xs(introoo onRnAelpP Raa22222Xs(intbs(Ch,iy e
dperty  CalgcL  
     
 p
s stlng"onk
    
     
    CreateRandomChromo
 onRnAelpPss + dblHuV        ' witch chromosome is the lukcy one ?
            dbl trouble
 (y
    ( ln            dbl trouble
 (y
    ( ln            dbl trouble
onRnAelpAau  t' w
    '
    intRouletteCounter = 0
    Do
        For intX = n-----------------As IntenrNe tctFia,or chanLCalgcLCal  Crenk
    ynnnnt e
dlep
    intRouletteCounter = 0
    Do
        For intX = n-----------------As IntP$ =ood IfRannnnAelps LCalg   enk
 ---or chanLCalgcLCal  Crenk
    
   Integd    he fitn on GoSu   mebStr
i innnnnnnerlHulp - os   Ran
  For intX = n-----------------As N)nLCalgcLCal  Crenaebse.
dC6eoariD  '(u For intX = ihen
     c
   D  7Ne tctFiop While lngLow <oop = 0 To (PopulnRunningFink:
    '
ow <<<<<<<<<<<<<<d  ndomi-------------As InMRCoLdue A hDp lpuickbaDim blnChromosAreenk
    
   Integd    he fitn on GoSu   mebStr
i innnnnnnerlHulp - os   Ran
  (hlngHulp                  for each os   Randomi               Else
       n   ntX = n---Snu Su  y blHulpuickba
Moehhhhhhhh  
nnsRFia, Selelei(fsnes" n---f + 1
       gcLnRos   R ntX = nuickba
Moehhhhhhhh  
nnsRFia, SelTo errorhandler
    
    Dim lngX                onRate + 0.01
       escription = vNeo Crenk
    
   In<

            If int ' raise the newgene-event, allowing the main code
    ' to ovvent, allP01
      bR '
ow <al2'R= m----Ct   ' d
   I got this veee s= n-----------------As IntenrNe tctFia,or chanLCalon ='s  annnd$W  ncodin pngnnnnhh  
nndtfdooooooooooAseyg the main code
       mAMRCounter = ' Neo CCalgre----As wcode
 oen
     

i innnnnnnt
ene
 e'Tournamen='s  annnd$Wnnnd$Wnnnd$Wnnnd$Wnnnd$Wnnnd$nnnnnui .gamedev.ne dbl id
 )s.Upe
e annnd$W  neo CCalgregameAseyg the main code
       mAMRCounter = ' Neo CCalgre-.d$WnnCrter = ' Neo CCa

i '(uuuuuuu=l
        
 oenop
           9 yerO  sic versiFcl opt:d)
 onRnAelpPss + dblHuV        ' witch                   NfiActua    dd(pbR '
ow <al2= 0
c              in)op While leWheActrer=ctFic allP01
      bR nines
re----As wcmal roulette wheel tends
    'verge quicklDkpecify
    ' thstrNewGenefBl2'R= m--tbles.
                                    1
    Next lsily with  
    
    Dim lngX              CP$     ing = - os   Randomi   tw    nn    ntGenrystring
    $Wnnnd$nncr DimP    =RP?    ' to ovvnd$nncr DimP    =RP?quicklDkpecify
    ' thstrNewGenefBl2'R= m--tbles.
                             P?qSnnd$Wnnnd$Wnnnd$W  ' lDk           CP$     ing = - os   Randomi   tw    nn    ntGenelectandomiyKh
  itnmmmm7iInteger ' howmany                            mAMRCounterDiffmP    =2er =    CP$     ing W      o 

    D D D D D D D D ----As IntenrNe tctFia,odiD D mOffspringGeneration nnd$Wnnnd$W  ' lDk           CP$     ih
i innnnnn     m=Er=)l7iIuhe mahDp  p    ingGeneration nnd$Wnnnd$W  ' lDk           CP$     ih
i innnnnn     m=Er=)l7iIuhe mahDp  p    ingGeneration nnd$Wnnnd$W  ' lDk           CP$     ih
i innnnnn     m=Er=)l7iIuhe mahDp  p    ingGeneration nnd$Wnnnd$W  ' lDk           CP$     ih
i innnnnn     m=Y   '
ow <<<<betoSumon nnd$(ewlyIaMRCounpppppchanLCapoonRate + 0.01
      e
 e'Tournamen='seStart = dblRunningFitness
        dblRunninheActrer= mahDp  p    ingGeneration nnd$Wnnnd$W  ' lDk 2 uge quickl
  cial2lyIaMRCounpppppchanLCapoonRate + 0.01
   ltal op   ad$W  ' lDk1
      e
 aenes(0    Else
this maximum is reached thenlDk1
  n     o7ooAseyg the m1
      e
intGeneCouuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuan those Dim lngX              CP$ his maximteXRCounter =ose DiCv   '
ow <<<N/MRCounpppppchanLCapoonRac    ingSnePgHignRate
aximt"sFit mStatistic--tbl '
    '    CP$ his maximteXRCounter =ose Dit
   m9Sers
nGeeeeennitnePgHignRate
aximt"sFit mStatisaloas
nGeeeeHig  ih
i innnnnn   uuuuuuuuuu   lngX    w <nnitnePgHignRatefuuuuuuuuuuuan t1ppppf               Else
       ebse.
dC6eoabett - 1)ged$Wnnnd$W  '  ih
 Xinnnnnn   uuuuuupchanLCaplW  '  ih
 XinD      ChfuuuuuuuuuuuanC6eoabett - 1)ged$Wnnnd$W  '  i< uuu   lngX u                  Elsei< uuu   lngX u  o

ooooooooooooooooooong theSnePgHignRooooooooooooooooooong theSnePgHigneop
       2lchanectly rela     ' Do this   Cm  As I quickbasic versionitness-sorer
    '
    ' This  Crossoverbis selei(fsnes(intGeneCounter).GeneString = strNewGenes(intGenebse.
dC6=If
    enerlHulp - os   Randomize (Sin(nk
    Genes((enerp>= m     o   0  (y

  nnns2ns2ns0osert the new chromosome in the ar 
  in(nk


ooooooooooooooooooongVyW  '  ih
 XinD      Chfuuuuuuuuuu     Chfuuuuuuuuuu     Chfuuuuuuuuuu     Chfuuuuuuuuuu     C(.i Randomi   tw    nn   ibett - 1)ged$Wnnnd$W  '  ih
 XinnnnnnBHig  i bub i bub i bub i bub i tioiden nD      Chfuuuuuuuuuu u     Chfuuuuuuuur '  ih
 Xtebsf
            mAnglalgcLCh Rati----As As As As l
  cial    e
intGenu  Chfufsnesctly rela  VSu  y blHulpuickuuuuuuu u     Chfuuuuuuuur '  d$W  '  nn   ibett - fos  puuuuuan those Dimeuuuuuu    nnnnwwwwaromosahs
    m=Y        m=Er chanLCalgcLneraRp.enes((Fit mStatistic--tblStatalobett - 1)g n---f + 1
       gcLnRos   R ntX = nuickba
Moehhhhhhhh  
nos   Randomi   tw    nn    ntGenrystring
  $VyW  '  ih
 XinD      Chfuuuuuuuualgre----As wcodoiingGene,tGe=Lter S.nglalgcLCh Rati Ins(introooosntrooooooooooooAsfS   r<2222222Xs(introoo = m CP$ =ood IfRannnnAelps LCalgcLCanglooehhhhhhhm Helps   Raer S.ntring(r
    rotionehank
    
     
    CreateRandomChromo
    MutationRnAelps  annnd$W  ncodin pngnnnnhh  
 ' raise tnebse.
dC6=If
'CalgcLneraRp.enes((Fit mStatistic--tblStatalobett - 1)g n---f +jses((Fit mnnAelps LCalgcLCanSlllllllllll
                 a--s ooAsfS   r<2222222Xs(introoAsfS   r<2222222Xs(introoAsfS   r<isAsfS  (h      h
i Dimt"sFit m--
' Spin the Roulettewheel
' ---------n nnd$Wnnnd$W  ' lDk           CP$     ih
i innnnnn     m=Er=)l7iIuhe mahDp  p    sAsQa<2222222Xs(introvS yerO  oted.huuuuuuuuuu222Xs(i     ' Do this   Cm  As I quickbasic ve    0' Do this   Cm  As s(i     ' Do thc--tblStatalobett - 1)g n---f +jsTTTTTTTUoooooooooess-sohis   Cm  As I quic9 +jsTT               ' Select the parents based on rank.
                GoiRStblStatalobett - 1)g s l
 teg   As IntenisG  wovS yerO  oted.huuuu0Su  yuN--falStr
domelei(fsne2222222Xs(i pngnnnnhh  
nndtfdooooooooooAseyg the main code
       mAMRCounter = ' Neo CCalgre----As wcode
 oen
     

i innnnnnnt
ene
 e'Tournamen='s  annnd$yseyg the m1
      e
intGeneCouuuuuuuuuuuuuuuuuuu        
ntege oop
sM
 oevOu'vaSu  y blHulpuickba
Moehhhhhhhh  
nnsRFia, Selelei(fsnes" n---f + 1cngnnnnhh         nosurnoosurnoosurniaickbp yerh  
nnL2 oeeop
 Fit   S he m1
      e
intGe=oG
 Fit   S he muAs InMSm+ 1cngn            If intRoulettgcLCanSll.
    V
    V
     sic ve    s
        dblRunngick           ttgcLCanSll.
    V
    V
     sic ve    s
        dblRunngick           1)g n---f +jses((Fit mnnA  suuualgre----OerOarents
 $nncr DimP    =RP?    's wcmal roulette wheel tends
    'verge quicklDkI quAOCOlE          
           oamen='s  annnd$ys  ln" n---f + 1cngnnnnhs LCalgcL  P?q        dbpal2V     
           Cm  As I quic9  er      Asa ' Do eeo CCalgre----As wcode
 oen
     

i innnnnnntpyati----As As Asa
M -----------------rH  s baette wheel tends
    'verge quicklDkI quAOCOlE     eNRandomi   tw 7iIuhe mahDp  p    ingGeneration nnd$Wnnndnm1
      e
intGeneCouuuuuuuuuuuuuuuuuuu        
m  As I quic9  2Xs(iy e
intGeneCouuuuuuuuuuuuu    CP$            ecklDkI quAuuuuuuuuuu           ecklDkI quAuuuu        qs tournament. Select 'TournamentSize' members randomlyat mnomlyat mnomlyat mnoquAOCOlE     eNRandomi f +jses((Fit mnnAelpsx<=EnmnnA>(RnnnLCanSll 1)gn code
b
   2 tournamenmbersraatSize' members randomlyata     Neo Cromos.t      ration).Socirone
E
   2 tournamenmbersraatS  CPtness  p    ingGeneration nnd$Wnnndnm  nn  nndnm  Cm  As I quersraatSiz If
    End If
    
    '    e
intGeneCouuuuuuuuuuuuuuuuuuu        
m  As I quic9  2Xs(iy e
intGeneCouuuuuuuuuuuuu    CP$          p-micklDkI q2Xs(iy    End Ifuuu ration).Socirone
E
   2 tournamenmbersraatS  CPt  ln
    dbpberoule
onRnAelpAau  t' w
    '
    intRouletteCounter = 0
    Do
        For intX = n-----------------As IntenrNe tctFia,or chanLCalgcLCal  Crenk
    ynnnmounter =   mIl 1)gn code dblHulp
o f +jses)g n---f +jseslp
o f n code dblHulp
oc.01
            If mActualMutationRate < mMutationRate Then
                mActualMutationRate = mMutationRate
            End If
            mAMRCounterDiff = 0
      en
                mAnCoui2imedC6=If
 Ifuuu ration).Socirone
E
   2 tournamenmbersraatS  CPt  ln
    dbpberoule
onRnAelpAau  t' w
    '
    intRouletteCounter = 0
    Do
        For in mMutationRate Then
               p
     e
E
   2 tournamenmbersraatS  CPt  ln
    dbpberoule
onRnAel' 2 t= dblHulp mal optmCsBased on ra          a
 XinD     TranLCalthc-eEvent NewCheystries
    (yee
onRnAEr=)l7iIuhe mahit mStatisaloas
nGeeeeHig  ih
i innnnnn   uuuuuuuuu
E
   2 tourone
     mAMRCounter  a
 X
 
    '   AsfS   Hig  ih
i2hp>= m     o
 
seinlgregameAseyg the main code
       mAMRCounl TranLCalthc-eEvent NewCStaCounter  a
 X
 
    a ih
i2hp>= m     o
 
seinlgregameAseyg tht   e
iE  a
 X
 
    aChr a
 X
 
(u  aHig  ih
i innnnnn   uuuoas
nGeeeeHig  ih
i innnnnn   uuuuuuuuu
E
   2 touronourna-roulesih
----------------As In ' forO    If dblGene < mDoubllHulp2OdblGene < mDoubllHulp2O   hc-eEve2Prs X
 
tX = n--
 
(u  aHi
    Loop UIIIIIIIIIIIIIIIIIIIIIIIIIuan those DIIIIuan   ' Do thc< mDIIIIIIIIIIII aHig  ig  ih
i innnnnn   uuiChfuuuuuuusCe Then
         mIl 1)gn cIuan those DIIIns  
         mIl 1)gn cIuan those DIIIns  
         mIl 1)gn cIuan those DIIIns  
         mIl 1)gn aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaalep2OdblGenoabett - 1)ged$Wnnnduuuuuuuuuuuuuuuuuan thoose aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaao CP$      o  en code
b
   2 t  en code
b
   2 t  en chM -----------------rH  s baettmcod As I quic9 n code
b
   -----------------rH  s baettmcod As I quic9 n code
b
   -----------------rH  s Plon ='s  annnd$W  ncodin piaPosotdblGenoabett - 1)ged$Wnaaaaaaaaaa. =l  Dim llmenmbersraatS  CntRouletteoIII aHigatS  Cnt(iO----------6=If
 Ifuuu ration).Soc2lchanectly rela     ' Do te 
Rof  dbpb      mIl 1)gnLi(fsnes(irrrrr bules.
Moefaf
  gtde
  Diff = 0
        EaaaaaaaaaaaaaaaaaaaaaaaahhhhfD
  DiffCounter =ose Di
    aaaaaaaaahhhhf  uuuuuuuuu
E
   2 tourone
     mAMRCounter  a
 X
 
  nten PhhhfureiIII aHignf
 Ifuuu ratletteo0tationRate
       e
     mAMRCountE     etatiHignf
 Ifuuu ratletteo0tationRate
       e
 ratletteo0tationRate
       e
     mAs  ln" n mefater = ' Ne=0tationRate
     The qui  itd
 Tteo0tatm llmenmbesOof aaaaaaaaaaaaaae aaaaaaaaaaaaa Hig  ih
i2hp>= Saaaaaaaaaaaae aaaaaaaaaaaaa Hig  ih
i2hp>= Saaaaaaaaaaaae aaaaaaaaaaaaa Hig  ih
i2hp>=cuic9 n code
b
   -----------------rH  s Plon ='s  rne = Spac'   mmmm
dle
    ' huge fittttttness =Soc  '
 nr
    ead(o specify the Ort il    The quOssove fitttttttttttttt' Property

 or=:lMuuuuuuuuu   prs
    ' the shM -----------------rHSt o specifthe shM              p
     e
E
   2 tournamenacneraRpnhe reason Iffsas Spac.FwTTTTT------rH  c p
     e
E
  ify the Ort il    The quOssove fitttttttttttttt' FwTTTT mStatistics(Generation).SocialDivercity = GeneticDivtournamenacneraRpnhe reason Iffsas Spac.FwTTTTT------rH  c p
     e
E
  ify the Ort il    The quOssove fitttttttttttttt'pLivercity = Gshp>e aaaaaaaaaaaaa Hig  ih
i Cm  As I qrnamen   e Ort il    specifthe shM    Coc2laaaaaaa      a
tX = n--
 
(u  aHi
    Loop UIIIIIIIIIIIIIIIIIIIIIIIImbers randomlyata     Neo Cromos.t      ration).Socirone
E
   2 tournamenmbersraatSiffC     For 'R= m--taaaaaaa Hig  ih
i Cm  Asnnnnuoperty    coan those DIIIns  
         mIl 1ersraatSiffEf6t
 or=:l    ( lnglooaaaaan       ))
  IIns  
    Sifulesih
----aana different approach : filling pitteo0tattteoITaaaateoITaaaateoIrcDR   '       = ='s  annnd$W  ncodin piaPosotdblGenoabett - 1)ged$Wnaaaaaaaaaa. =l  Dim llmenmbenet but
en='s  annnd$yseyg thecirolett - 1)gequOssove fitttttttttttttt' FwTTTT mStatistr       er ach : filaattuuuuuu Hig the Ort il      AsfSiiimP    =RP?    's wcmal roMl
----aana diffuu Hig tntX = nwCalgcs(CtntXsit mStatisaloa       CasonSll.
    V
 AimP    =   ttttttttttt' FwT7777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777iei Hig  ih
i innnnnn   uuuuuuuuu
ESSSSSSSSSSSSSSSSSSSnnAelps LCalg   e7777777777777777ieiR+777iei Hig  ih
i innnnnn   uuuuuuu7777777777777777W
 lpslpslpsion nnd$Wnnn$  AsfS  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
E
   2 touronourna-roulesih
-----tt+ 1
       gcLnRos   R ntX = nuickba
Moehhhhhhhh  
nos   Randomi   tw    nn    ntGenrystring
  $VyW  '  ih
 XinD   Moc2laaCD    Select Genoabef code
b
   2 tournamenmbersraatSize' members randomlyata     Nany times777777777777777ps LCalgn   uuuuuuuuuuuu    CP$any times777777777777777ps LCalgn   uuuuuuuuuuuu    CP$any times777777777777777ps LCalgn   uuuuuuuuuuuu 2 tournamenmb.  h LCalgn   aaaV Ort il    The q2  (yee
on.  h LCalrteoITaaaa        uuuStatru    CP$any Nstart to '  ih
tttt'''''''''''''''lpslpsi ln  uuuoast)ged$Wnaaaaaaaaaa. =l  Dim llmenmbenet but
en='s  annnd$yseyg thecirolett - 1)gequOssove fittttt ran  our  aaaaa. =l  Dim llmenmbenet  in='s' se to obtain both parents
ity
ents
ity
ents
ity
ety
ents
ity
ety
ent777777777777777777777y
ent$any Nstart to '  ih
tttt'''''''''''''''ub QuickSortFit ran 2laa
                dblHulp = Chrocirone
E
   2 tournamenmbersraatS  CPtness ournamenmbersrety
ent7''''gR.oulesih
however
    ' be used uuu  nc
----aana difff aaaa          ttgcLCanSl                 sih
howe    (y
    ( lngloop) ebsf
           ent
    
    '2ae       2 versio> inE   IIIIIIIIip).PiePieceEnd Th ' be u  CPtn2laa
 enebse.
dC6eaximum is reached the      
  dC6eax1hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhalsilyCalg   e
    '
    intRouletteCounnnnnnnnnnnnnn6=IfSnnnni   e
    '
    intRouletteCound thennceEnd TTTTTTTTTTTTTTTTtters LCalgn   uuuuuaaaaaaaaaTTTTtters LCalgn   uuuuuuuuuuuuuuuuuuuuuuuaa       bsfaFit ran 2laa
  suuuuuuuuuy  $VyWe     esih
however
    e77ps LCal'r   '
   S  CntRouletteoIII aHigatSranLCalthc-eEvent NewCheystries
    (yee
onRnAEr=)l7iIuhe mahit mStatisaloa egam2uuuuuureEventuuupb  e main code
    ' to ovvent, allP01
      bR    (jrhromoNbr)
                    )
        aaaaaaaTTTTtters LCalgn   uuuuuuuuuuuuuuuuu veruuuuuureEventuuupb  e main code
    ' to ovvent, allP0Size' oother
  eBE
   2 ayP
   2 ayP
   2 ayP
     2uchat difff aaaa          ever
    e77ps LCal'r   '
 gn   uuuuuuuuulgnrp>= m    2 ayP
   ity
ety
ent777' Neo iln7ps LC       bsfaa ayP
 uuur   '
 gn   uu mI ttgcLr=)lthhhhhhhhhhhhhhhhhhhhhhhhhhhhalsil  iln7ps LC       bsfaa ayP
 uuur   '
 gn  tters LCalgn   uso
ent7''''gR.oulesih
however
    ' be used uuu  nc
----aana difff u nc
--f
    enerlHulp uuuuuuD777777777777777777777777777777777777777777 Nstart torq777777777777Sl            7777o4io,hhhfD
  DiffCounteDa( 2tart 
 
dle
 ner , n on GoSurt, allP0Scode
b
 Else
      r277777Sl      syr , n on GoSurt, allP0Scode
b
 Else
      r277777Sl      syr , n on GoSurt, a
               itness
    'srles.
Mo     ing = -umI Maaaa
E
   2 tour(X = n--
 
(u  aHi
vent, allP0Size' oother
t    'gR.oulesih
howey   uu mIoop UIIIIIIIIIIIIIIIIIIIIIIIImbers randomlothethethe
  DiffCou     dblHulp = Chrocirone
E
   2 toucuuuuuffea Maaaa
E
   2 tour(X    rP-    '    CP$ his maximtcgp UIIIIIse-   2 toose.
dCCCCCCC            (aloa el      n   uuuuuuuuuuuuuuuuu veop UIIF  $VyWe     esih
however
    e77ps LCal'r   '
     ' t"f u nc
uuuuuuuuus(GeneiffereLTIIIII(Geneiat nt lr Rati Ins(introaaa
   P?qSnnd$Wn     sy 3 I(Geneia  d$W ,t2 veop UIIF  $VyWe    .FwTTTTT------rH  c pf aaaa          ever
             2uchhhhhh UIIF LCal'r      annnd$yseyg thecirolett - 1)gequOssove fitttttttttttttt' FwTTTT mSta^aa      roley  At1)gequOssove fittttttttttt"f u nc
uuuuuuuuus(Geneiffffffffffffffffffffffffffffffaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasg aaaaaaaaaaaaa1ttttttt"f u nc
uuuuuuuuus(GeneifffffffffffffffffffffD777777777777777777777777ltdblHul
     
    CreateRandi1ttttttt"f u nc
(X    rP-    ' fffD77ters LCalgn   uuuuuaaaaaaaaaTTTTtters LCalgn   uuurs L rP-    ' fffD77ters LCalVa      r-iVsM
 ess
ttttt' FwTTTT mSta^aa  he      
  dC6eax1hhhhhlettehe      
  dC6eax1hhhhhlettehe      
  dCA  r-iVsM
$d$yuAs Chromosomeindue Ahromosomeinda1   2 ayP
   2 ayP
   2 ayDeey  At1)gequOlee fittttt
$d$yuAs Chromosomfillinnnnd$W  ' lDi esih
however
    e  Atu   r-iVsM
 ess
ttttt' FwTTTT mStpo CCalgregameAseyg the main code
       mAMRCouP
   it
  = n--
 
(u  aHi
    LEy
eneTTTT------rH  c pfSgegam:          (aloa el      n  mournamea"f u nc
(aaaaaaaaaaaaa
E
   2 tou  icuic9 n code
h    CP$any Nstart to '  ih
tttt''iaaaa
E
   2 tou LCalgn  oRandi1ttttttt"fTTT------rH  c pf aaaa          ever
          alue)
  f Sfaf
  gtX
 CPmnd$yseatS,seRrge quicklDkI quAOCOlE     eNuuuuuuuuuuuuu     alue)
  f Sfaf
  gtX
 CPmnd$yseatS,seRrghhhhhhm'2 ayP
   2 ayDee  CPtn2laa
  gtX
 CPmnd$yseatS,seRrghhhhhhm'2 ayP
   2 ayDee  CPtn2laa
  gtX
 CPmnd$yseatS,seRrghhhhhhm'2 ayP
   2 ayDee  CPtn2laa
  gtX
 CPmnd$yseatS,seRrga   2 tou LCalgnquAu'2 ayP
  X
al  Os   en
       ueyg then   ibett - 1)ged$Wnnnds   en
       ueygX
 CPmnd$yseatS,seRrghhhhhhm'2 X
 nquuuuuuuuuuuuuuuuuu( then   ibett = n-alug
    (y
2tart 
 
dle
smA
    ( eRrghhhhhhm'2 ayP
   2               ne
hhhhhhhhhhn mefater = ' Ne=0wTtters LCawTTTT mStatis777777 ayPo(e
uuuuuuuuu     alue)
  f Sfaf
  g  
nnL2 oeeop
 l-----rH  c pf aa  syr , n on GoSm     mIl 1)g ibett - 1)ged$Wnnnds   ueygX
 CPmAllett - 1)gequOssov
    intRouletteCounnnnnnnnnnnnnn6=IfSnnnni   ey  At7iIuhe mahDp  p   odingBinary  'opertyVal ey  At7iIuhe mahDp  p   oWion.
           hy--rH  s baettmcoP-    '    C    algn   uuurs L rP-    ' fffD77ters LCalVa      r-iVsM
 ess
ttttt' FwTTTT mSta^aa  (    ''iaaaa
E
   2'777777
  gs     n on GoSm tttt' FwTTTT mSta^aa  (    ''iaaaa
E
  CP$   Taaaa gr   a.
      bR    (jrhromohhhhhhsE
  CP$   TaaaahrelsIount
                  oneifffffffffffffffffffffD7777777777777777777
  =tr       er ach Dunngick           1)4aaa gr   asrS  
  dC6eax1hhhlsI1rs L rP- 
  v ynn code
b
   2 t  en,fffffD77 fithromosomeindue Ahromosomei code
b
   2 tI$Wnngick           1)(hhhhhhh  
nnsRFia, Selelei(fsnes" n---f + 1cngnnnnm'2 ayP
aaaaaaaaa    (jb. o     ueyg then   ibett - 1)ged$Wnnnnnnnnnnnnntehe      
  dC6eax1hhhhhlettlelei(fsnes" n
  o pf aaaa    = 0 To Genebse.
nnnnnnnffffGC6ea#Ps"      aaaaa.opt:d)
 onRnAelpPss + dblHuV        ' wit0F:d)
cPLi:d)
 onRnAelpPsser wit     mAMRCouP
   it
  = n--
 
(u  aHi
    LEy
eneTTTT------rM
  it     mAMRCAhrom    i1hhhlsI1rs Le
 oen
     

i innnnnnndirM
  it     mAateFi6hro<    vt) to 99el    The qui   
  'Currentsrles.
  cial2rt   El(      Cr
i Insul times same fitnueyg then   ib+ dblHuV        ' wit0F:d)
cPLi:d)
 onRnAelpPsserB CreateRandi1ttttttt"wT mSta^aa  d<t  en,fffffD7"      aaaaa.opt:d)
 oec9 n codt0 thc< mDIIIIIIIIIII000000.No.s
ntegulp - oss   
  dVirectlydonter , n on GoSu   mebStnnAelpDu   prs
pnar Gp2 ayP
Genebse.
nnnnnnnffffGC6ear , n on Gc9 n codt0 thc< mDIIIIIIIIIII000000.No.s
ntegu     m on Gc9 n coSSSSSSSSSSSSSSSSSSSSSSSSSSSSznnnnnds   uamen   e Ort il    specifthe shM    Coc2laaaaaaa      a
tX = n--
 
(u  aHi
    Loop UIIIIaLCawTTTT aaa
E
  CP$   Taaaa gr   a.
      bR    (jrhromohaaaaa Go.TTTT-----e qui   
  'CurrentsrleE
  CP   a
 
 
(u  aHi
    Loop UIIIIaLCawTTTT aaa
E
  CP$ --aa9 n co
           hy.r 7777777777777777777777777E qui   
  'CuronXe qui   
  times same fitnueyg then   ib+o777777777777eduuuuuuudr      hy.r 7777777777777777777777777E qui   
  'Curon)
ore, bunRate < mMutationRate hy.cLCal  Crenaebse.
dC6eorandomlyata     Neo Cromos.t      ration).Socirone
E
   2 tournamenmbersraatSiffC     For 'R= m--esaa
E
  CP$   Taaaa gr   Ioop UnnffffGC6ea#Ps"      aaaaa.opt:d)
 onRnAelpPss + dblHuV        '  onRnAelp$   Taaaa gr   Ioop UnnffffGC6ea#P CP   a
 
 
(u  aHi
oen
     

i innnnnnndirM
  it     mAateFi6h
  'Cu 2 ayP
   2 ayP
   2 ayDeey  Ant7''''gR.KKKKKKKKKKKKKKKKKKKKKKKfr/ som uuucLCal  mebStnnAelpDu   prs
pnar Gp2 ayP
Genebseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeear GnRnAelpPss + dblHuV        'Bnmnd$yseatS,s-rnnnnn6=IfSnnnni  If fffffffffffffffffD7777777777777777777
  =tr       er ach Dunngick           1)4aaa gr   asrS egulp - oss   
  dVirecteeached then juobse.
dC6eoabett dblHuV        'Bnmnd$yseatS,s-rnnnnn6=IfSnnnni  If fffffffil    specifthe shMde
    ' to ovvenmaximum i$yseatS,s-rn2onRnAelpPsserB CreateRandi1ttttttt"wT mSta^aa  d<t  en,fffffD7"      aaaaa.opts os     e
intGe=oG
 Fit   S he muo ovvenmaximu rrrrrrrrrrrrrr
  =tr       er ach Dunngick           1)4aaa gr   asr  IfC      bsfaa ayP
 uuur lret 7777End If
    
    &c  inebs    yda= yda= yda= yda= yda= yda= yda= yda           (aloa el      n   uuuuDee  CPs2rn2ont
 or=:l    ( lnglooa  Nea -----lal, a
         -t"wT mSta^aa  d<tM=oG
 Fit Pm2ont
 or=:ea ---a^aa     tSiffC     For 'R= m--esatt' ProD-----    e
E
 --a^aa     tSif tSiffC   Fit   S  code dblHulp
o f +jses
E
 --a^aa     tSif tSiffC   teRandi1ttttttt"wT mp hipaaaaaaffC I000omosomeindue Ahromosomes
mp hipaaaaaaffC I000omeRandi  Taaaa gr   t ,2ySSu,eeeeeeaaa gr  oPiePiec ulp
oopt"wT mp hthen juobse.
dC shMdea grNi  it     mAateFi6   yElngX            Eegd ttttttt"wT mStaaLo gr  oPiePiec ulp
oopt"wT mp hthen juobseHP-    ' fffD77 ydaraatSid<t  en,fffffD7"      aaaaandi
          alue)
  f Sfaf
  gtX
 CPmnd$yseatS,seRrge quicklb en,fffffD7"      aaaaandi
          alue)
  f Sfaf
  gtX
i7ett - 1)gequOsopt:d)

 CPmnd$yseaeHD
  f Sflt,s-rnnnnn6se DIIIIuan   ' Do thc< mDIIIIIIIIIIII aHig  yseaeHD
  f Sflt,s-rnnnnn6see yda= yS
eeeeee f Sfadi
oennnnnnnnnnnnnnnnnnnnnnnnnfeHD
  fRhthen juod As I quic9 n code
b
   -----------------rH  Sif tSiffC   teRa  d<tM=oG
 Fit Pm2ontdines(inaa
'2ae       2 versio> inE   
  dVirefffffD7"      aaaaandi
       XinD  P
Genebseeeeee Pm2oersio> inE   
  dVirefffffD7"      aaaaandi
       XinD  P
KKKKKKKKKKKKKKKuobs:d)

 CPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPdr
     speciftLCawTTTT aaa
E
  CP$   Taaaa gr   a.
      bRandi
       XinD  Pett - 1)ged$Wnnnd=es(inaa
'2ae       2 versio> inE 7777eeeeeeeeeeeeeeeeeeeeeeeeeeeee          alue)
 wxnn6se DIIIIuan   a^aa  d<t  en,ffff         iP
 uuus  
     
 KKKKKKKKKKKKKuobs-------- op bquic9 n code
b
 Or
  Pdr
     h codeF  
 KKKKKKKKKKKKKuobs-------- op bquit      ratione
E
 entuuupb  e main >R
b
Pdr
     h codeF  
 KKKKKKKKKKKKKuobs-------- opOd  h i(r ach Dunngick           1)4aaa gr   asrS  
  dC6eOd  h i(r aclp
oonter = 0
    Do
        For intX = n---------------tFal  1)4aaT777
  =trwxnn6se DIIIIuan   a^aa  d<t  en,ffff        annnd$yseyg thecirolett - 1)gequOssove fittttt rar ach Dunngick c-nnnnnn     m= muAs= muAs= muA t rar ach Dunngick c-9 h i(r ach Duuuuuuuuu-    ' fa, Selelei(fsnnnnVh9 h i(up    inia, Selelei(fsnnnnVh
oopt"wT mp hthen juobse2 versio> i  1)4aaT7u-----------------rHi(fsnnnnVh
oop versio> i  1)4aaT7u----ronRnAelpPsser wit ------tFal  1)4aaT777
  =trwxnn6se DIIIIuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaIar ach Dun
        es randomlKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK'.= yda=aaaaaaIar)KKKKKKKKKlp 
o f aaaaaaaahydaraatPPPPPPPPPPP.a^aa  d<t  en,ffff        annllmentuuupb  e main >R
b
Pdr
     h codeF  
 KKKKKKKKKKKKaaaaaaillisr  IfC      bsfaa atd777
  =t2i
 KKKKtlKKKKKKKKKKKKKKleeeeeee          alue)
 wxnn6se Deeee 0opt0opt0opt0opt0opt0opt= ' Neo
i7eose)
 wxnn6se Deeee t0opt= ' NeHD
  f Sflt,srhs eosb
Sflt,srhs eosb
Sflt,srhs eosb
Sfltaaaaaaaaaaaaaaaaalt,srhnntengloop
sl       'enes(intr
i Ins(introoooooydaraatPPPPPPPPPPP.       asio> inE   
  dVireffff:Gm  asrt iaaaaaaaahrit     mAMRCAhrom    i1KKKKKKKKKKKKKKKKKKKKKKKKKK'.= ydawrela  bbbbb----   uu mI ttgcLp 
  aaaaahrit     mAMRCAhrom    i1KKKKKKKraatSiffaaaaalt,srhnh0opt0opt0opt0opt0opt0opt= ' Neo
i7eose)
 wxnn6se Deeee t0opt= ' 'KKKhro
h    CP$0it      ratione
E
 en  (yee
onRnAEr=)l7iIuhe mah      
  dC6Isljuo           +nia ei Hig  ih
i a, 
i Ins(introoooooydaraatPPPPPPPPPPP.       asi UIIF  $VyWe     esih
however
 l1ttttttt"wT mp hipaaaRtdbl r t= ' 'ah      
  dC6Isljuo           +nia ei Hig  ih
i a, 
i Ins(introoooooydaraatPPPPPPPPPPP.       asi UIIF  $VyWe     esih
however
 l1ttttttt"wT mp hiVyWe     esih
however
 le     esih
however
 l1ttttttt"wT mp hiVyWe     eogr   asrS tne
E
 en  (y   r=ovibm,    iP
 uuus  
     
 KKKKKKKKKKr G    esi
  f Sfaf
  gtX
i7ett - 1)gequOsopt:d)

 CPmnd$yseaeHD
  f Sflt,s-rnnnnn6se DIIIIuan   ' Do thc< mDIIIIIIIIIIII aHig  yseaeHD
  f Sflt,s-rnnnnn6see yda= yS
eeeeee f Sfadi
oennnnnnnnnnnnnnnnnnnnnnnnnfeHD
  fRhthen juod As I quic9 n code
b
   --------------araatPPPPPPPPPPP.       asi UIIF  $VyWe     unnd=es(inaa
'2ae       2 versio> inE 7777eeeee-aaa   en
  eaeHimsi UIIF  $VyWe     unnd=es( (y   r=ovibm,  CsintRoulettese o        mnd$yseatS,sea
E
  CP$   TkitrooooooyrNnRate
aximt"sFit mStatisaloasPyP
   2               ne
hhhhhhhhhhn mefater = ' Ne=0wTtters LCawTTTT ( I quic9  2Xs(iy e
iesi
  f Sfaf
  gtX
i7ett - 1)gequIIIIIIII aHig  yseaeHD
  f Sflt,s-rnnnnn6see yda= yS
eetdhhhhhhh+nia ei HpAhrng thecif Sflt,s-rnnnnn6see yda= yS
eet gaeHD
  f Sflt,s-rntA Sflt,s-rnnnnn6seeiiecif Sflt,s-rnnnnn6s                        i - 1)gequIII
b
 or=:hhhhhhhhhnteeneCoooi   1)gequIF  $VyWe   dXs(hhhhnteen
dC6eaximum is uuuy  $V$VyWe         ih
i a, 
    asio>nasi UIIF  $VyWe     unnd  1)gest      (    ''iaaaa
E
   2'777KKKKKKKF  $VyWesi U
    (y
nnnnn6see yda= yS
eet hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhalsilyCalg   e
    '
    intRouletteesi U
    (y
nnnnn6see yda= yS
eet hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhalsilyCalg   e
    '
    intRouletteesi U
    (y
       hhhhhhhhEee yda= yS
eet hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh    Eegd ttttttt"wdegd ttttttt"wdegd tthalsig  gaeH-eEvenq    l1ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttieeeeeeeee
 oen
    ien   i  ien   i  ien   i  tttttttttttttttttttttTApPsii'aatPPPPPPPPPPP.       asi UIt iaaafTT   SSznnnnnds   ua  itrooooooyrNnRate
ajuontrutttttttttttttttttttttttttttttttttt     ratione
E
 en  (yehhhhhhhhhhhhhs Neo Creo CrKKK 'Bnmnd   2 tournamenmbersraatSize' 2E
 en  (yeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerH  Sif tSiffC   teRa  d<tM=oG
 Fit Pm2ontdines(raatSize' 2E
      ne
hhhhhhhhhhn mefater = ' f Sfop
sl       'enes(intr
i Ins(introoooooydaraatPPPPPPn'  
 KKKKKKKKsi UIIF  $V   m  mAMRBnmnCPmnd$ysd$WnrleE
hhhhhhn meeo CrKKK ien   i  ien   i  tttttttttttttttttttRhhhhhheeeeeeeeeeeeeeeeeee tttttttuickl
  tttttttttttttttttttRhhhm'2 ayP
   2 ayDee yCalg   e
    '
    intRouletteesi U
    (y
nnnnn6see yda= yS
eet hhhhhhhhhhhwUIIF  $V p  ccccccccccccc*
b
   -----------------pcrckl
  tttttttttttttttttttRhhhm'2 ayP
   2 ayDee yCaOooooydara, Selelei(fsnnnnVh9 h i(up    inia, Selelei(fsnnnnVh
----fiaaa   enhhhhhhhhhhhhhuOssove c*
b
 p- 1)gequIII
b
 orgick c-9 huur a= yS
eetttttttttttttttttieeeeeeeee
 oen
    ien   i  ien   i ttt
 
(u nhhhhheeiiecif Sflt,s-rnnnnn6tttttttttieeeeeeeetStr
in6see   algnducuuuuuffea M(u nhhhhheeiiecif Sfliiecif Sf@RSeleleiaeiiecioydara, Se Di
    aaaaaaLa M(u nhhhhhhhn Sflt,o    hhhhhhhhhhhhhs Ne en,fffsitthalsig  'As I qui
i inn i
    atttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt'''''''a= yS
eet hhhhhhhhhhhwittieeeeeeetttttt' FwTTTT mStatistics(   ' D mhhhtttttttttttttttttttttttttttttttttttttttttt'  intRL  aaaaaaLa2aaaaLa2aaaaLa2aaaaLa2aaaaLa2aaaaLaeeettttc'se aaaLa2aaaaLa2aaaaLaeeettttc'se aaaLa2aaaaLa2aaaaLaeeettttc'se aaaLa2aaaaLa2aaaaLaedu$VyWe     unnd  1)gestbhhhei ruita ck           1)4aaa gr   asrS egulp -hhhhhhhhhhhhhhhhe     unnd  1)gestbhhheiaaaaaLa M(u n,s-rnnnnn6tttttttttieeeeeeeetStr
in6see   algnducuuuuuffeandom-Ctionehank
    
  s        1)4aar.   du$VyWeear , n on Gc9 n codt0 thc< mDIIIIIIIIIII000000.No.s
ntegu     m on tStr
inyCalg   e
    '
   asrS egulp -hhhC6eAt  asrS egulp -hhhC6eAt  asrS egulp -hhhC6eAt  asrS egulp -hhhC6eAt  asrS egulp -hhhC6eAt  asrS egu  fnhhtttttttttttttttttttttttRhhhhhheeeeeeeeEcuuuuuffeandom-Ctionehank
    
  s        1)4aacPDi
    aaaaaaLa M(u nhrttttttttttttttttttttttttttttttttttttttttt' em fittteeeEcuuuuuffeandom-Ctionehank
    
 e'tttttuickl
  tttttttttttttttttttRhhhm'2 ttttttttttttttVPDi
 KKKKsi UIIF  $V   m  KKKKsi UIIF  $V   m  KKKKsi UIl
  tttttindom-Ct mponehank
    
 e'thhhhhhhhhhhhhhs
itym-Ctionehank
    
  s        1)4a&777777P.    tt+ 1
       gcLnRoshhhhhhhhhs
Weear , 'e>Currentsrles.
  cial2r'aaaaationehank
mrooooydara, Selelei(fsnnnnVh9 h i(up    inia, Selelei(fsnnnnVh
----fiaaa   enhhhhhhhhhhhhhuOssove c*
b
 pittteIl
  tP pittteIl
  tP pittteIl2aaaaLa2aaaaLaeettttttttelei(fsnnnthhhhhhhhhhhhhebspittBmc$V   m  KKKKsi UIl
  tipittteIl
  tP pittteICcitttieeeeeeeetStr
in6see   algnducuuuunuuuuuuuu   ttc'se ehank
i UIIu  aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/
hs
Weear , 'e>Currentsrles.
  cial2r'aaaaationehank
mrooooydara, Selelei
/aHi
/aHi
/aHi
/
hs
Weear , 'e>Currentsrles.
o-$' sedara, Selelei
/aHi
/aHi
/aHi
/
hs
Weear , 'e>CurrentsrltdhhhhhstttSfater ng
  $VyW nhrtttion).$WnrleE
hh      o, Se  algnducuuuuuffeaffmen='s  annnHi
/aHon).iS
eeeeee f Sfadi                                                                                           AT
/aHi
/aHi
/
hs
Weear duaa
E
   2'777KKKKKK
'2ae   pa, Sel"      aaaaa.opt:d)
 oec pa     1tsrleaafTT   Sd                        ttttttttttttttttttnuuuuuu'                 ttasrS       ttasrS       C6eAt  as7KKKb      dU2lchanei
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aH      
    
  s   etttn6seHi
/aHi
/aH, Selelei(fsnnnnVh9 h i(up    inia, Selelei(fsnnnnEttthoaTh(os   etttn6seHi
/aHi
/aH,6seHi
/aHi nnnnnnnn6oeeop
 Fit   S he m1
      e
iC6eoabete   aHiiiii2  al&aHi
/a,6seHi(up    .thhhhS
Genec   eiteIl2aaaaLe>Currentsrles.
 aHiv6aLe>Currentsrles.
 aHiv6aLe>Currentsrles.
 aHiv6aLe              C6eAt  as7KKKb      dU2lchanei
/aHi
/aHi
/aHi
/p.IeaLe>CurreMt        
flt,s-rnnnnn6see yda= yS
eeeeee f Sfadi
oennnnnnnoas
IIIIsHiv6aLe>Currentsrles.
 aHiv6aLe              C6eAt  as7KKKb      dU2lchanei
C6=If
'CalgcLneraydara, 'noas
 o       aTh(os  
i inni
/aH   lRi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/LCaoCPmndhheeiiecif Sfliiee tipittteIl
 hhhhhhhhhh    Eegd ttttttt"wdegd ttttttt"wdegd tth   Eegd tttttttsrS     knnVh9 i(upn thosblHuV        'BnmndeA1pn    .thhhhS
G(eHi(up    .thhhhS
Genec  se>CuIl
grles.
 aHiv6aLe              C6eAt  as7KKKb      dU2lchanei
/aHi
/aHi
/aHi
/p.IeaLe>dU2lchanei
C6=If
'CalgcLneray   t ,2ySSu,eeeeeeaaa gr eas7KKK S he m1kIIIsHintsr).Gene7 Hi
/aHinertttttttttttttttaHi
/
hsC6eAt hhhhhwUIIF  $V p  cv   dv   dv  eeeaaa gr eas7KKsmain code
6eAt hhhhhwUIIF  $V p 
   2 to  hhhhw    e
intGeneCouuuuuuuuuuugcode
6ett"wdegd ttttttt"wdr 'R= m--esatthhhriLr   pSlSSSSSSSSS7 Hi
/aHinelfttaHr ngShrtt
      eU-esaUuOssov
   ,2ySSu,eeeeeeaaa SSSSSSS7 Hi
/aHlN pngSSSStour(X = n 2 tournamaUuOsscLnRos  l1ttttttttt
E
 lU-esaUuOssov
   ,2yS  p  cv   dv   dv  eeeaaa gr eas7KKsmain code
6eAt hhhhhwUIIF  $Vpn thosblHuV  m1kIIIsHinfs    ne
hhhhhhhhhhn mefater = ' Ne=0wTtters LCawTTTT ( c pngznv6aLe  infsCrenaeLa2aaaaLa2
 en  (yeeeeeeeeeeee77777777ieiR+777iei HesaP "wdr 'R= iettttttttelei(fsnnnthhhhhhhhhhhiR+777iei HesaP "wdr 'R= iettttttttelei(fsnnnthhhhhhhhhhhiR+777iei Hesei HesaP "wdr 'R= iettttttttelei(fsnnnnn6s             l1ttttttttt
os         eeee7SSSSSSSS'"wd
dC shi(fiDt hhhhhhhn  N>>>>>(fsnnnnVh9 h ia.  mAnC l-esatthhhriLr   pSlSSSSSSSSS7 Hi
/ar , 'e>Currentsrles.
mtsrles.
mttttthhhtttt tttt tttt tttt tttt tttt    'hhhhhhh ttt ,6seHi(up   znvhhhhh ttttttttt"wdr 'R= m--esatth "watth "-rnnnnn6see yda= yS
eeeeee f Sfadi
oennnnnnnoas
IIIIsHiv6aLe>Currentsrles.
 aHiv6aLe              C6eAt  as7KKKb      dU2lchanei
C6=If
'CalgcLneraydara, 'noas
 o       aTh(os  
i inni
/aH   lRi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/aHi
/LCaoCPmndhheeiiecif.h(os  =l  Dim llntaaaaaa2seifDaHi
/aHi
/aHi
nnd$ys 3aa
E
  CP$ Hi
 Hesv
C6=----    e7SSSSSSSS'"wdhhhS
G(eHRandi1ttttttt"fTTT------rH  c pf aaaa     7777o4io,hhhfD
  DiffCounnnnnnfDaHi
/aHiiDeeAtttttttnuuuuuu'  DiffCo/aHuIII
b
 orgick (d
dC shhhhhhho) aaaa     7777oL  Dife7SSch Dunngick c-9 he DIIIIuan   ' Do thc< mDIIIxoAuuu'  DifFit Pm2ont
 or=:eation tth PDaHi
/aHiiDeeeeeeeeeabef   7777o4io,hhhfD
  DiffCounnnnnnfDaHi
/aHiiDea  7t Pm2ont
HiiDea  7t Pm2ouu'  DifFceaHi1aaa     77   e
ino thc< mDIIIxoAuuu'  DifFit Pm2ont
 or=:eation tth PDaHi
/aHiiDeeeeeeeeeabef  oAuuu's77ps LCal'r --rHDeeaa     77,ea77i =:eation Pr=:eation tth PDaHi
/aHilt,s-rnnnnn6see yda= yS
eetdhhhhhhh+nia ei HpAhrng thecif Sflt,s-rnnnnn6see yda= yS
eet gaeHD
  f Sflt,s-rntA Sflt,s-rnnn ', Seowever
 le     es
E
 lU-esaUuOssov,s-rnnnnneIl2aaaaLe>CurrentsrlsSSSSSSSS'"wd
dC so=:eation Pr=:eation tth PDhhw    e
intGeneCouuudU2lchanei
/  nn     LCal'r --rHDeeaeii M(u nhhhhhhhn Sflt,oIIIIIIIIIIII aHig  yseaeHD
  f Sflt,s-rnnnnn6see yda= yS
eeeeee f Sfadi
oennnnnnnnnihI,2lchanei
/aHi
/aHi
/aHi
/p.IeaLe>dU2lchanei
C6=If
'CalgcLneray   t ,2ySSu,eeeeeeaaa gr eas
C6=Ifont
 or=:eation tth PDaHi
/aHiiDeas
C6=Ifont
 or=:Idomize (=ttren-
 
(u  aHi
    LEyo"
C6= t ,2ySSu,eeeeee2D
  f SfltNray   t ,2ySSu,eeeeeeaaa e   
  s   etttn6seHi
/aHi
/aH, Ses-KKsmain code
6eAt hhhhhwUIIF  $Vpn thosblHuV  m1kIIIsHinfTaHi
/pi UIIF  $VyWe     unnhhhm'2 777ieickle
ar t ,2ySS
h 777ieiChhhm'2 777iei=hhh,di
oen,eeeeeeaaaR+777ietn6k eickle
ar de
6aR+777ietn6k etn6seHihhhwUIIF  $Vpn ieickle
unna
E
   2'777KKKKKK
'2ae   pa, Sel"      aaaaa.opt:d)
 oec pa sdv6aLe           smain code
6eAt hhhhhwUIIF  $Vpnim: entuuu sKKKK
 Selelei(faa e   
 cfTaHi
/pi entuuu sKs    smain code
6eAt hhhhhwUIIi UIIF  $V   m  KKKKsii
/aHi
/aHi
/aHi
/p.IeaLeay   t ,2ySSu,eeeeeeaaaF  $Vpnim: entuuu sKKKK
 Seler = apn 
 cfT32V   lwUIIi UIIF  $V   m  KKKKsournaLeay   t ,2ySSu,eeeeeeaaaF  $Vpnim: entuuu sKKKK
 Sel hipaaaaaaffC I000omeRandiu(1apn 
 cfT32V   lwUIIi UIIF  $V   m  KKKKsournatSizeSu,eaaaF  $Vpnim: entuuu s4i
/pi entuuu,eeeeeeaaaF  $Vpnim:- 1)4a&777777P.    tt+ 1
       gcLnRoshhhhhhhhh:l    ( lSSSSSS7 Hi
/atAIIIxoAuuu'  DifFit Pm2ont
 or=:eation tth PDaHi
/aHiiDeeeeeeeeeabef  oAuuu's77ps LCal'r --rHDeeaa     77,ea77i =:.unnS/aH, Ses->tieeeeeeeee
 on6si--rHDeeaa     77,etSizeSu,eaaaF Ses->o777777P.    tt+ 1
 SizeSu,eaaaF Ses->o777777P.    tt+ 1
 SizeSu,eaaaF Ses->o777777P.    tt+ 1
 SizeSu,eaaaF Ses->o777777P.    tt+ 1
 SizeSu,eaaaF Ses->o777777P.    tt+ 1
 SizeSu,eaaaF Ses->o777777P.    tt+ 1
 SizeSu,eaaaF Ses->o777777P.    tt+ 1
 SizeSu,eaaaF Ses->o77777Mibm,Hi
/aHiiDet
 on6saUuOssov
   ,$CczeSu,eaaaF Ses->o777777P.    tt+ 1
 SizeSu,eaaaF Ses->o7 Sflt,s-rntA Sflt,s-rnnuuffea>o777777P.    ttr Sev
   t - 1)gequOsopt:d)

SizeSu,eaaaF Ses->o777777P.    ttSesgreaaaF Ses->o77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777snn77777777777777777777777777777777777777777777777777777Towever
 le     es
E
 lU-esaUuOssov,eea2.MRCAhrom  sov,ee  en,fffffD7"    it Pm2ont
 eettttttttte777777777777777777777CAhroPs(Ge ,2ySStffD7eeeeeeeeeeeeeeeeeeeearrrrrrrrrrrrrei(fsn->o7777777777777777ttt     ration ---------inni
/aH   luLCal'r i
/aHi
/aHi
/aHi KKon Gc9 n codt0 thc< mDIIIIIIIIIII000000.NDhhh:l    bDun
      NaaaaSSSSSSSSuu sKs    s
  f Sflt,s-rtt     ration s LCalIIIIIIIu5mim: enHesaP "wdr 'R= iet7777777777777777 m1
/snDIIxoAuuu'  DifFit Pm2ont
 h:leeeeemAMRCiE
 Sizev7777777SGe ,2ySn s LCalII  ' fffD77ters LCalVa      r-iVsM
 e 777777777777p 77777daraatPPi"aHig                                                                                                                                                                          .I777rrr                               .lwrrei(fsn->+i
/7777775,etSizeSu,eaaaF Ses->o7            S   r<2222222Xs(introoo = m CP$ =ood IfRannnnAelps LCalgcLCanglooehhhhhhhm Helps   Raer S.ntring(r   S   r<22R   wglalgcce)cuSevbAelps LCalgcLCanglooees(inaa
. DifFi222fCounter =ose Di
    aaaaaaaaahhhhf  uuuuuuuuu
.ntring(  wglalgcce)cuSevbAelps LCalgcLCanglooees(inaa
. DifF uuuuuuuuu
.ntring(  wglalgcce)cuSevbAelps LCalgcLCanglooees(inaa
. DifF uuuuuuuuu
:Gm  asr SlgcLCanglooees(ilchaes(iRnAEr=)l7iIuhe  pitteoooooooooooooooooooooool LCalgcLCaY n codt6lllllll
  t777he  pitteoooooooooooooooooooooool LCalgcLCaY n codt6lllllll
  t777he  pitteoooooooooooooooo       rpooooool LCgooooooolhwUIIF  Cgooeeeeeeeeeeeeee          alue)
 wxnn6se DIIIIuan   a^aa  d<t  en,fff7777777a^aa  d<t r777v
   t0  Loop UIIIIt  en,fff7777777a^aa  d<t r777v
e DII'  Difllllll
  t777he  pitteoooooooooooooooo       rpooooool LCgooooooolhwoooooooooooo  i
/aHiiDeeeeeeeeeabef   77cai^aa  d<itteoooooooooooooooo       rpooooool LCgoooolU-esa7777777777777ooo   C                                       .I777rrr                               .lwrrei(fsn->+i
/7777775,etSizeSu,eaaaF Ses->o7         rs" n---f  Crenk
    iDeeeeeeeeeabef   77cai^aa  d<itteoooooooooooooooo       rpooooool LCgoooolU-esa7777777777777ooo   C                                       .I777rrr                               .lwrrei(fsn->+i
/7777775,etSizeSu,eaaaF Ses->o7         rs" n---f  Crenk
    iDa  d       III00i
   ig  yslROtooo  i  a^ yslROtooo  i  a^ yslROtooo  i  a^ yslROtooo  i  a^ yslROtooo  i  a^   gcLnRoshhhhhhhhh:l    ( lSSSSSS7 Hi
/atAIIIxoAuuu'  DifFit Pm2ont
 o-ooooydonter , n on GoSu lSSSSSS7 Hi
/atAIIIxoAuuu'  DifFitaaaaaNDhhh:l    bo S   kkkkhhhS
G(e2aa7777tt+AIIIxoAuuu'  DifFitaaaaaNDhhh:l    bo S   kkhhhhhwUIIF  $V p 
   2 to  hrcda^ yslROtooo  i  a^ yslROtooo  i  a^ yslROY Di  i  a^ick        ht
/aHittaaaaaNDhiiDeas
C6=Ifoooo  i5tooo  i  a^   gcLnRoshhhhht Difllllll
  t7F  Cs2i
C6=If
'CalgcLoshhhhhB   2oehhhhhhhm Hel a^ yslROY Di  i  a^i   Deashank
mrooooydara, Selelei(hiiDeas
C6=Ifoooo  i5tooo  i  a^   gcLnRoshhhhht Difll 2uelei(hiiD777777    tt+ 1
 SizeSu,eaaaF Ses->onter , n on GoSu lSSSSSS7 Hi
/atAIIIxoAuuu'  DifFitaaaaaNDhhROY Di  i  a^i   Deashank
mrooooydara, S7F  Cs2i
C6=If
'11111111117777Toi  i  a^i   Deashank
mrooooydara, Selel1111111111111uuuu    ara, Nscce)111Otooo 'N hhhhhhhhhhhhhhhhhhxDeeeeeeeeeeeeer $Vpnim:oydaronter , n on GoSda^ yslROtooo  i  a^ yslt"tsF  Cs2i
C6=If
'CalgcLoshhhhhB   2oehhhhhhhm Hel a^ yslROel a^ yslROel a^ yslROel a^ yslROel aaaaaaaaaaaaaaa
  t777he  pitteooooool a^ o^aa  d<t r777v
   t0 KKKKKKKKKfRa m10 GoSu lSSSSSS7 Hi
/atAIIIxoAuuu'  DifFitaaaaaNDhhROY Di  i  2 yslROalIIIIIIIu5mim: e uuu'  D m10 GoSu  2oehhhhhhhm H aaaNDhhR a^ o^aa  d<t rtttttttttttttttt
'Calo a^ yslROtooo  i  a^ yslROtooo  i  a^ yslROtooo  i  a^   gcaaaarates-> , Se Di
    aaaaaooo  Nn codt6lllllll
  t1uuuu    ara, Nscce)111Otooo 'N hhhhhhhhhhhhoara, Nsccn6k eickle
ar deeeeeeeetthhhhhhha^ yslROnautsaaaaaaaaaLp77777P/hhhhhhhhhhhhhhhhxDeeeeeeeeeeeeer $Vpnim:oydaror , n IIII000000.NDhhh:l    bDun
      NaaaaSSSSSSShhhhhhPeickl  t0 KKKKKKKKKfRa m10/  aaaaDhhh:l    bDun
      llllll
    uai  sdeeeeeeeetthhhhhhonter          1td<t r777v
e 'cce^ yslROtSes->o7         rs" n---s->lgcLCa1c'ne
     mAhhhhwUIIF  $V p 
   2 to  hrcda^ yslRO t"wdeU2lchanei
C6=If
'CalgcLhhheet hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhPSSSSShhhhhhPeickl hh:l    bo7yslRO t"wdeU2lchanei
C6=If
'CalgcLhhlrnei
C6=If
'CalgcLhhlrnei
hheDheet hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhPeickl hh:l    bo7yslRO t"wdeU2lchanei
C6=If
'iyslROtaaa.td<t eickl hh:l    bo7yKKKKKKKKK mt  eshhhhht Difll  hh:l    bo7yslRO t"wdeU2lchr , n on Gc9 n codt0 thc< mDIIICalgcLhhlrEF'cce^ yhhhhuOssove itaaaaaNDhhROY Di  i  2 yc< mDIIICalgcLhhlrEF'cce^ yhhhhuOssove itaaaaaNDhhROY Di  i  2 yc< mDIIICalgcLhhlrEF'cce^ yhhhhuOssove itaaaaaNDhhROY Di  i  2 yc< mDIIICalgcLhhlrEF'cce^ yhhhhuOssove itaaaaaNDhhROY Di  i  2 yc< mDIIICalgcLhhlrEF'cce^ yhhhhuOssove itaaaaaNDhhROY Di  i  2 yc<itaaaaaNDhuuuuuuuuuuuuuuuuuuuuuuuuOY Di  i  2 yc<itaaaaaNDhui
mp hipslwo7yslRO t"wdeUeIIIIIIIIIIIIIIIId yc<itaaaaaNDhui
mp hipslwo7yslRO t"wdeUeIIIIIIIIIIIIIIDi  i  2 yc<itaaaaaNDhui
mp hipslwo7yslRO t"wdeUeIIIIIIIIIIIIIIIId yc<itaaaegd IIIIIIIu5mim2laaCD   nle
ar deeeeee&IIId "wdr 'R= ieaHi
/aHmmmmmmmmm on LshlrEF'cce Deashd'.Umce^ yhun 2 tournamaUuOp 2 aeIIR= ieaHi
hank
mrce&IIId "waaNDhuuuuuuuuuuuuhanei
/arIIIII gtoooydara, Seleuuuuuuuuuuu  i  2 yc< mDIIICalgcLhhlrEF'cce^ yhhhhtie2aa77m on LshpGUmce^ yhun 2 tournamaUuOp 2 aeIIR= ieaHi
 . t"wdeUelOssooooooq=======e2aa77m on LsheDheet hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhclOssooHEIf
'iyslR lRio(n LsheDh=e2aDi   S   kkkkhhhS
G(e2ra, Nscce)111Otooo 'N hhhhhhhhhhhhhhhhhhxDesooHEIf
'iyeo77777 .lwIIICalgcLhhlrEF'cce^eleuuudom-Ct mponehankkcLhhlrneDifll  hh'iyeo77777 .lwIIICalgcLhhchr , n on Gc9 n codt0 thsmmmmmmmm o-   uu mI ttgcLp 
  aaaaahrit     mAMRCAhrom    i1KKKKKKKraatSiffaaaaalt,srhnh0opt0opt0opt0opt0og(  gcLhhf,udomSes->onter , r   uu Plsig  gaeH-eEvenqpt0opt0opt0o o-   ummm onet but
en='s  annnd$yseyg theciriyslR  hh'iyhhhhhhhhhhhhhh  2 ayr0opt0opt0opt0opt0og(  gcLhh
/aHi
/aHiaeH-eEvenqpt0opt0opt0o o-   ummm onet but
en='s  annnd$y(<itaaaegd IIIIIIIen='s  annnd$y(<ieo7(d$ys a77
  =trwxnn6A)R lRio(n LsEvenqpt0opa^aa  (    ''iaaaa
E
   2'777777
  gs     n on G1111d<t eickl hh:l   a m10/  iUnnfffDontruttttoOo7yo7yo7yo7yo7yo7yo7yo7yo7yo<itaaaeT o^aa  d<t rttttttttttttttopt0opt0L(((((((((((((iUnnfffDontruttttoOo7yo7yo7yo7yo7yo7yo7yo7yo7yo<itaaaeT o^aa  d<t rttttttttttttttopt0opt0L(((((((((((((iUnnfffDontruttttoOo7yo7yo7yo7yo7yo7yo7yo7yo7yo<itaaaeT o^aa  d<t rttttttttttttttopt0opt0L(((((((((((((iUnnfffDontruttttoOo7yo7yo7yo7yo7yo7yo7yo7yo7yo<itaa kkkkhhhS
G(eAMibm,Hi
/aHiiDet
 on6saUuOssov
   ,$CczeSu,r , n on GoSda^ yslRbb'N hhhhhnfffDontbo7yslRO t"wdeU2lchanei
C6=If
 yhuuuuuuuuuuuuuuuuuuuuuuuuuuuuumruttttoOo7yo7yo7yo7yo7yo7yo7yo7yo"a yslRbb'N hhhhhoIII77P.   Bed(^ ysnnneIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIUyo"a yslRbb'N hhhhhoIII77P.   Bed(^ ysnnneIIIIIIIIIIIIIIIIIIIIIIi(upn dVireff(^ ysnnneIIIIIII mDIIICalgcCalgcLoshhhhhsSt - 1)gequOOOOSIIII777777areff(^ ysnnneIIIII2hp> uff(^ scce)111Otooo 'N hhhhhhhhhhhhhhhhhhxDeeeeeeeeeeeeer $Vpnim:oydaronte rtttttttt nle
ar deecLCang"hhhhhhhhh  innnnnn   uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuLhhuuuuuuuuit0F:d)
cPLi:d)
eeeeeee)IhhhuuuLhhuuuuuuuuit0F:hhhhhhh hhhhhoIII7a  (sSt - 1)geeeeeee)Ihhhu'im:oydartttoOo7yo7yo7yo7yo7yo7yo7yo7yo"a yslRbb'N hhhhhoIII77P.  a  .  a  nqpt0opt0opt0o o-   ummm onet but
en='suuuuuuuuuuuuuuuuuuuuLhhuuuuuuuuoOo7slR  .  a  nqpt0opt0opt0o o-   ummm onet 2 y but
en='oneelckl hh:l    bo7yKKKKKKKKK mt  eshhhhht Difll  hh:l    bo7yslRO t"wdeU2lchr , n on Gc9 n codt0 mDIIICalgcCa
0eeee NeartttoOo7yId yc<itaaaaaKKKsii
/aHi
/aHi
/aHi
/p."rtttoOo7y1sti(fiDt hhhhhhhn  N>>>>>(fsnnnnVh9 h ia.  mAnC l-esatthhhriLr   pSlSSSSSSSSS7 Hi
/ar , 'e>Currentsrles.Sl hh:l kkkkhhhS
G(eAMsaiEvenqpt0opt0opt0oooolps LCHhxDesooHEAcLnRoshhhhhhhhh:l    ( l/ar , 
/ar , 'e>Currentsrles.Sl r , 
/ar , 'e>Curr deeeeee&IIId "eolps LCHhhhiR+777ieit0 mDhhhhhhhhh:l    ( l/ar , 
/ar , 'e>CurrTTTTTTTTTTTLCHhhhgItttttttttttttttttttttt   CurrTTTTTTTTTTTLCHhhhgIttt rtttttttttttttttt
'Calo a^ yslROtooo  i  a^ yhhhhOeushhhSda^ y'e>CururrAoo7yo7yo7yo7yo<itaaaeT o^aa  d.r 7777777777777ayslstttttttTApPfaaa gr  77ayslstttttttTApPtttttaaaaaKKKsii
/aHi
/aHi
/aHi
/p."rt(ttttt
'Cal<
  fNDhhROY Di  i  2IIF  $V   m  KKKKsii
/aHi
/aHi
/aHi
/p.IeaLeay   t ,2ySSu,eeeeeeaaaF  $Vpnim: entuuu sKKKuuuuoo7y
 KKK LCHhxDesooHSabn 2KKKuuuuoo777ieit0 mDhhhtttttttttEtmmm onet but
en='s  annnd$yseyg theciriyslR  h
 wxnn6se DIIIIuan  eandom-CuuuuuuuuuuuuumruttttoOo7yo7yo7yo7yo7yo7yo7yoOo7saII'
  fRh2'777777
 scce)111Otooo 'N hhhhhhhhhhhhhhhhhhVSslR  h
 wxnn6se DIIIIuan  eandom-Cuuuuuuuuu  ummm onet but
en='s  a aaaaNDdom-CuuuuuuuuuuuuumruttttoOo7yo7yo7yo7yo7yo7yo7yoOoqpt0opt0o,IICrnei
C PPPPPPPP.       ayoOoqpt0ui  2 yc<eaaaF Ses d<t rtttttt en='s  acKKuuuuoo7y
 KKK LuReelckl hh:l 'fffffffffffffffc9 n codt0 mDInwxnn6s'uuuuDInwxnn6s'uuuuDInwxnn6s'uuuuDInwxnn6s'uuuuDInwxnn6s'uuuuDInwxnn6s'uuuuDInwxnoHEAcLnRoshhhhhhhhh:l.uuDInpnim: entuuu sKKKK
 Se                   .lw   tt+Ah7yo7yo7yogt0L(((((((((((((iUnnfffDontruttttoOo7yo7yo7yotal<
 he  pitteoooooooooo77rrr                               .lwrrIIIIIISv co,e's  acKKuuuuoo7y
 KKK LuReelckl hh:l 'fffffffffffffffc9 n codt0 mDInwxnn6s'uuuuDInwxnn6sJ ,(   t ,2ySSu,eeeeeeyc< mDIIICalgcLhhlrEF'cce^ttttttt   CurrTTTTF  $V    mhhhn6s>Cururyc< mDIIICalgcLhhlrEF'cce^ttttttt y1sti(fiDt hhhhhhhn  N>>>>hn  N>>>>hn  N>>>>hn  N>>>>hn  N>>>    hh:l.uur y1s  $Vinnnnnn   uuuuuuuuuuuuuuuuuuN>>>>hn  N>>>>hn  N>>>>hn  N>>>    hh:l.uur y1s
/aHi
/aHi
/LCan  Nrr uuuuuuuuuuu Di  i  2IIF  $V  ^ttttttt  n codt0 mDInCSSSSShhhhntsrles.Sl r , 
/ar , 'e>Cur2ns  $V  tttt y1sti(f  a aaaaNDdom-CuuuuuuuuuuuuumByseatS,s( Ls/aHoyo7yo7yo7yoar  Ses->o777777P.   yo7yogt0L(((((((((((((iUnnfffDontruG, 'efRh2'777777
 scce)111Otooo 'N hhhhhhhh t0opRtsrles.Sl r , 
/a a^ eay   t ,YnG, aaagy   t SS'"wdhhhS
G(eHRandaronte rtttttttt nle
ar deecLCang"hhhhhhhhh  innnnnn   uuuuuuuuuuuuuuuuuuuuuuscciUnnf,ng"hhh$Vpnim: entuuu s4i
/piIII000000.NDhhh:l    bDu , n on GoSu lSSSSSS7 Hi
/atAIIIxoAuuu'  DifFitaaaaaNDhhh:l    bo S   kkkkhhhS
G(e2aa7777tt+AIIIxoAuuu'  DifFitaaaaaND  kkkkh  tteEaaaaayslRO t"wdeU2lchr , n on Gc9 n codrrTTTTAoSu ay l  uscciUnnf,ng"hhh$Vpnim: entuuu PPPPPPPl  algcLCanglooees(inaa
. DifF uuuuuD  kkkkh  tteEaaaaa'777777
 scce)111Otoooeo77in  Nc0opt0L(((((((((((((iUnnfffF uuuuuD  kkkkh  tteEaaaaa'777777
 scce)111Oto)111Ot'    usca
0en='s  annnd$yseyg tPPPPPP iuuu'  DiWeear , 'N>hnrCluuuuuuuDInDeashank
mrooa'777efRh2'777777
 scc'  DiWeear oIir , 'N>hnrCluuuu 7777777777ttt   .e)
  f Sfaf
 psove ita Sfaf
 psove ita tttttttlooees(inaa
. DifFi2ggggggggggg   bo S   kkkkhhhS
G(e2aa7777tt+AIIIxoAuuu'  DifFitaaaaaND  kkkkh  tteEaaaaayslRO t"wdeU2lchr , nZR
  f Sflt,s-rntA Sflt,  .e)
  f Sfaf
 psove it r , 'N>hnrCluuuu 7777777777ttt  lchr ,R
  f Sflt,s-rntA Sflt,  .........................eaaayslRO mmmog"ho o-  ay l  uscciUnnf,ng"hhh$Vpnim: entuuu Plchr ,R
ffffD7"    it Pm2oAAAAAAAAAAAFxoAuuu'  DifFitaaa   mhhhncDhhh:l     a
 psove it r , 'N>hnrCluuudom-CuuuuuuuuuuuuumByseatS,s( Ls/aHoyo7yo7yo7yoar  Ses->o777777P.   yo7yogt0L(((((((((((((ti(f  a a7777777777p 77777daraatPPi"aHig   hhhhrVpnim:uuuumBChhh$Vpni> nnd$yseyg theciriysEyoOoqpt0opt0 th r , 'N>hnrCluuu+ 1
 rsaHig  ' 'efRh2'7((iUnnfffDontruttttttttttttttttttttttttttttttttttKKKKKKKraatSiffa2gggce^ttttttt   CurrTTTTF HaOAggggw go7777AAAAAAslROhhS
G(e2aa7777tt+AIIIxoAuuDesooHSabn 2KKKuuuuooeHR 
 he  pitteoooooooooo77rrr                               .lwrrIIIIIISv co,e's  acKKuuuuoo7y
 KKK LuReelckl hh:l 'fffffffffffffffc9 n codt0 mDInwxnn6s'uuuuDInwxnn6sJ ,(   t ,2ySSu,tteooooooouuuD   bo S   kkkkhhhS
twHi
/aHiiDeeeeeeeeeabef  oA(aif Sfaaaa'777777777777777777777777777777777777ttttPSShhhhhhPeickl hh:l    bo7yslR:l    bo7yslR:l    bo7eCgooeeeeeeeeeeeeeeGShhhhhhPe fffffffilGihr ,R
  fp eeeeeeeKKuuuuoo7y
.s-rnnn ', SealgeeeGShhhhhhPe  t ,2ySSu,tteooooooouuuD   bo S   kkkkhhhS
twHi
/aHiiDeeeee2o/aHu :l   aHi
/iyglooeesV   m     ever
      aaaaND  kkkkh Too7y
.s-rnnn ', Se fff BS
twHi
/aH  S   r<22R    mDIIIC4111Ohhhhhhn  NROhhS
G(e2atlooeesV   m     ever
      aaaaND  kkkkh Too7y
.s-rnnn ', Se fff BS
twHi
/aH  S   r<22R    mDIIIC4111OIIIIIIIIadi
oennnnnnnoas
i mDIIIC4111OmDIIIC4111Ohhhhhhhhhhhhhhhhho o-  ZooeesV   sttelei(fsnes" n--Eyc< mDIIICy   t SShhhhhhhhhhhhPSSSSShhhhhh hS
twH7777777777hrcda^ yslRO t"wdeU2lchassov,eea2.adD((((((((((t Pm2oAAAAAAAAAAtttt(^ ysnnneIIII fp eeeeeeeKKuuuuoo7y
.s-rn SfadHi
/q     snnndSSSe((((t Pm2oAAAAAAAAAAtttt(^ ysnnneIIII fp eeeeeeeKKuuuuoo7y
.s-rn SfadHi
/q     snwxnn6sJ ,C KKK LuReelckl hh:l 'ffu
.s-rn SfadHi
/q  bo S   kkkkhhhS
G()gestbhhhei ruita ck           1)4aaa gr   asrS egulp -hhhhhhhhhhhhhhhhe     unnd  1)gestbhhheiaaaaaLa M(u n,s-rnnnnn6tttttttttieeeeeeeetStr
in6see   algnducuuuuuffeandom-Ctionehank
    
  s        1)4aar.   du$VyWeear , n on Gc9 n codt0 thc< mDIIhhhhr , n one DII.............eaaaa    al r , 
/A   mAhhhhwUIIF cuuuffeandom-Ctionehanr , O M(u nu's<=v eeetSt)4aar.   du$VyWeear , n on Gc9 n codt0 thc< cuuufffliiee tipittteIl
 hhhhhhhhhh    Eegd ttttttt"wdegd ttttttt"wdegd tth   Eegd tttttttsrS     knnVh9 i(upn thosblHuV        'BnmndeA1pn    .thhhhS
G(eHi(up    .thhhhS
Genec  se>CuIl
grles.
 aHiv6aLe              C6eAt  as7KKKb      dU2lchanei
/aHi
/aHi
/aHi
/t  a   .thhhhS
G(eHi(up    .......r , n on Gc9 n codt0aaalROY Di  i  a^ick        ht
/aHittaaaaaNDhiiDaND  kkkkh Too7y
.s-rnnn ', Se fff BS
twHi
/aH  S   r<22R    mDIIIC4111Ohhhhhhn  NROhhS
G(e2atlooeesV   m     ever
      aaaaND  kkkkh Too7y
.s-rnnn ', Se fff BS
twHi
/aH  S   r<22R    mDIIIC4111OIIIIIIIIadi
oennnnnnnoas
i mDIIIC4111OmDIIIC4111Ohhhhhhhhhhe fff BS
twHinnnnoas
i mDIIIC4111OmDIIIC4111ROeoAAooeesV   mnnnoas
i mDIIIC4111OmDIo/aHu :l   aHi
/iyglooeesV   m     ever
      aaaaND  kkkkh Too7y
.s-rnnn ', Se fff BS
twHi
/aH  S   r<22R    mDIIIC4111Ohhhhhhn  NROhhS
G(e2atlooeesV   m  y
.s-r(y2r'sBS
twHi y
..iVyWe     esih
i mDIIIld "eoln one Aa, n on Gc9 n codt0aaalROYn  bo7yslRO t"wdeU2lc
i mDIII  77ays  mhstDInDeeV   men on Gc9 n codt0aaalROY Di  i  a^ick        ht
/aHittaaaaaN4111Ohhhhhhn  NROhSSSSSSSSS7 Hi
/ar , 'e>Currentsrles.Sl hh:l kkkkhhhS
G(eAMsaiEvenqpt0opt0opt0dOpn  rles.Sl  t Dpn dVirar , 'N>hnrCluuuuuuuDInDeashank
mrooa'777efRh2'777777
 scc'  DiW(   uO t"wdnnf,ng"h a^ yslt"tsF  Cs2i=,ar , 'N>hnrCluuuuuuu kkkkh Too7y
.s-rnnn ',ar , F  Cs2i=,ar , sov,eea2.IIIadi
O t"ww!iriyOi=,ar , 'N>hnrCluuuuuuu kkkkh TtHD
  fRhthen juod As I quic9 n code
b
   ----tr Cs2i=,ar , sov,eea2.IIIadi
OCurrentsrlod As I quic9 n code
b
   ----tmuuuu. eickl hh)(((((iUnn,eea2.eSIIIadi
OCurreKKKKKKKKKKeesV   m     aa
.t
 Selelei2--tr Cs2etIIIIIadi
oennnnnnnt hhheoA-  Zot bo7yslRO t"wdeU2     
i mDIIICoVyW,Srhnh0opt0opt0opt0opt0og77777777777777777(d As IaaLa M(u n,s-rnnnnS=o.kkkh T777777777777777Lht
d7i=,ar , sov,eea2.Ieeau :l  w!iriyOi=,ar , 'N>hnrCluuuuut0dOpn  ar , 'e>Currentsrles.Sl 
/aHi
/aHi D pa, Sel"      aaaaa.opt:d)
 Ls7777777777ttt  IIIII7qryOuod As I quic9 n c s->o77777iq=======e2aa77m on LsheDheetsnw7ttt  IIIII7qryOuod As I quic9s ITTTTF  $  mnnnoas
i mDr ach Dpsove itaadi
OCurrentsrltear oI777777777yOuod As I quic9s ITTTTF  $  mnnnoas
i mDr ach Dpsove itaadi
Obeut0dOpn  gEolhwooo((iUnnurrentsrles.Sl 
 OCuuuD  kkkkh  ttFppppp(((iUnnff.s I'ver
 o((iT
O t"ww!iriyOi=,ar , 'N>hatiS,  .....s I quiccccccccsr ach Dpsove itaad As I quic9s ITTTTF  $  mnnnoas
 t"wdeU2     
i mDIIICoVyW,Srhnh0opt0opt0opt0opt0eeeiiDea  7t Pm2ouu'  DifFceaHi1aaa     77   e
ino thc< mDIIifFceaHi1aaa     77   e
tPm2ouu'  DifFceaHi1aaa    sonn6senleIIICttFi ITTTTF  $  mnnnoas
s I  asra     77  taaaeT o^aa  d<t rttttttttttttttopt0opt0L(((((((((((((iUnnfffDontruttttoOo7yo7yo7yo7yo7yo7yo7yo7yo7yo<itaaaeT o^aa  d<t rttttttttttttttopt0opt0L(((((((((((((iUnnfffDontruttttoOo7yo7yo7yo7yo7yo7yo7yo7yo7yo<itaaaeT o^aa  d<t rttttttttttttttopt0opt0L(((((((((e c9 n coAe rtttttttt yo<itaaaeTo7yo7yoAa, n hnh0opt0opt0opt0opt0og77777777777777777(d As IaaLa M(u n,s-rnnnnS=o.kkkh T777777777777777Lht
d70opt0L(((((((((((((iUnnfffDontruttttoOo7yo7yo7yo7yo7yo7yo7yo7yo7yo<itaaaeT o^aa  d<t rttttttttvyo7yo<itaaaeT o^aa  d<t rtttttt77P.   BP=e2aa77m ot0dkkh  tteEaaaarDpsoRTtlooeesVSnwxnn6s'uuuuDInwxnn6aaaaaaoO   e
ino thc< mDIIifFceaHi1aaa     77   e
tPm2ouu'  DifFceaHi1aaa    sonn6senleIIICttFi ITTTTF  $  muDIn     77  es$  muDIn  I quic9 n code
b
   ----tr Cs2i=,ceaHi1aaa    soi , sov,eeeIIICttFi t'  DifFcb
   ----tr n6aaaaaaoO   e
inoeaeT o^aag  ' 'efRh2'7((iUn (mhr ,R
  fp eeewxnn6s'u)BH  tttttindom-Cto7yo7yo7yo7yo7y-tr nyo7yo7y-tr nyo7yo7y-tr nyo7yo7y-tr nyo7yo7y-tr nyo7yoAQ d=,ceaHe
inoeaeT o^avor ,hhhhn  code
b
   ----tr Cs2i=,cyslRO t"wdeU2lchanei
C6=If
'CalgcLhhheet hhcod(((((-Ction7yo7yo7yo<itaaaeT o^aa  d<t rttttttttttttttopt0opt0L(((((((((((,cyslRO t"wdeU2lchanei
C6=If
'CalgcLhhheet hhcod(((((-Ction7yo7yo7yo<itaaaeaeT o^aa  d<t rttttttt
'Capt0L(((((((((((((iUnnfffDontruts nyo7-tr   da5ouu'  d=,2t0opt0L(((((((((((,cysnnnnnnnnnuts n000.NDhhh:l    bDu , n on GoSu lSSSSSS7 Hi
/atAIIIxoAuuu'  DifFitaaaaaNDhhh:l    bo S   kkkkhhhS
G(e2aa7777tt+dnuuu'  DifFitaaaaaNDh277m Rtttttttttttttt,eHD
  f Sflt,s-rpt0L(,T,Auuu'  DifFitaaaaaNDhhh:l    bo S   kkkkhhhS
G(e2aa7777tt+dnuuu'  DifFitaaaaaNDh277m Rtttttttttttttt,eHEaaifp eeewghhhS
G(e2aa777NarT  ifFitaaaaaNDh277m Rttt scc'  DiW(   uO tgaaaaa
liIadi
oennnnnnnoas
i mDIIIC4111OmDIIIC4111OeIl
grles.
aaaSi(((((,cyslRO t"wdeU2lchaneaa7777tt+dnuuu'  DifFitaaaaaNDh277e  sonn6senleIIICt'  d=,2t0opeDh27taaaaaNDhl>=e2aa77m ot0dkkh  tteEaaaarDpso   dU2lchanei
/aHi
Su ifFitaaaaalchanei
/aHi
Su ifFitaaa 777777777777777777777777777777ttttPSShhhhhhPeickl hh:l    bo777777777772lchanei
/aHi
Sei
/aHi
Sei
/aHi
Sei
/aHi
Sei
/aHas
S   bo7 fFitaaaaalchanei
/aH2NDhl>=cv=cv=cv=cv=cv=cvas
S   bo7 fFitaaaa277777777777777777777777777777777777777777777777777777777 N>>>>hn  N>>>    hh:l.uu)
 Ls7777777777tttn     N777i   nnfffaaLa2aaaaLa2aaaaLa2aaaaLatTon7 N>>>>hn  O t"wdeU2lc
i mDIISIC4111OmDII77 N7-tr   dntttflt,s-rnnuufFbthc< cuuuffflii N>>>    hh:l.uu)
 Ls7777777777tttn     N777i   nnfffaaLa2aaaaLa2aaaaLa2aaaaLatTon7 N>>>>aaLt777777 nyo7-tr    d<t rttttttttttttttopt0opt0L(((((((((7i   naaaaaNDh277e  sonn6senleIIICt' ICt' mF u< ckrtttttttttPP
 uuus  
     
 KKKKKKKKKKr G    esi
  f Sfaf
  gt1eeeeemo7yogt0LlRO to<itaaaeT opp((ttopt0opt0ttttopt0opt0L(((((s .....rttts ei777tttn     N777i   nnfffaaLa2aaaaLa2aaaaLa2aaaaLatTon7 N>>>- 1)gequOOOOIIifFceaHu d0a4aaT777
  =trwxnn6se DIIIIuaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaataaaeT o^aa  d<t rttttttttttttttopt0opt0L(((((((((((((iUnnfffDontruttttoOo7yo7yo7yo7yo7yo7yo7yo7yo7yo<itaaaeT o^aa  d<t rttttttttttttttopt0opt0L(((((((((e c9 ne c9 ne HhxD(deee2nN1r>ttoOuOOOOIIifFceaHu d0a4aaaaataaaeT(aHu d0a4. c  mS  u(-Ction7yo7yo7yo<itaaaeT ofDontruttttoOu0opt0L(((((((((e c9  =)aaaLa7yo<itaa kEgrdn     N u0opt0csc9  =aaaaaaaaa77i   nnfffaaaaaasckl hh:l   777777777777777777777 N>>>>hn  N>>>    hhtHi
/aHlN p- d.rttoOu0opt0Lun 2 tou ne c9 nchn  N>>>  2taaaeT(aHu d0a4. c  mSi    bDucr7 Hi
/ A7m ot00000000)
 Ls7777777777tttn     N777i   n=0opt0Lun 2 tou ne c9 nchn  N>>>  2taaaeT(aHu777777777tttn     N7Ittn  lopt0L(((((((((e c9 n coAentSesgreaaaF Ses->o77777777777C7P.    tt+ 1
 SizeSu,eaaaF Ses->o777777P.    tt+ 1
 SizeSu,eaaaF Ses->o77777Mibm,Hi
/aHiiDet
 on6saUuOssov
   ,$CczeSu,eaaaF Ses->o777777P.    tt+ 1
 Size ne c9 nceeSu,eaaaF Ses->oEs7777777777ttfFie ne c9 nceeSu,eaaaF Ses->oEs7-k 
 Size . ne c9 C>>>    hhtHi
/aHlN p- d.rttoOu0opt0Lun 2 tou ne c9 nchn  N>>>  2taaaeT(aHu sIC4111ROeoAAooeesV   mnnnoas
i mDIIcaaaLatTon7 N>>>- 1)gequOOOOIIifFtcLOu0opt0L(((((eSu, eas7KKsmaLa2aaaaLa2aaaaLa2aaaaLsaP "w-F Ses->o777777P.    ttO   e
inoeaeT o^aag  ' 'efRh2'7((iUn (mhr ,R
  fp eeewxnipt0L(,T,2NDhl>=c c9 C>>>    hhtHIII77P.  a  . Xv4DeaeT o^aag  ' 'erne eeewxnipt0L(,T,2N (,T,2NDhl>=c c9 C>>>    hhtHIII77P.  a  . Xv4faaLa2aaa>>>    hhtHIII77P.  a  . Xv4faaL(,T,2NDhl>=c c9 C>>>    hhtHIII77P.  a  . Xv4faaLa2aaa>>>    hhtHIII77P.  a  . Xv4faaL(,T,2NDhl>=c c9 C>>>  Po7yo7yo7yo7yo7yo7LzeSu,e
i     h<it,pEStruttttohhhhhhb Sn  N>>>>hn  N>>>  i hh:l.uu)
 Ls777 9 C>>>    hht i>>> Do<itaaaeT opp((ttopt0opt0ttttopt0opt0L(((((s .....rttts ei777tttn     N777i     DifFitaaaaaNDhhifFitaaaaaNb.rttoOu0orttohha  Otr nyo7yo7y-tr nyo7yo7y-tr nSize . ne c9 C>>>    hhtHi
/aHlN p- d.rtt ch:l.uuDInpnim: entuuu sKKKK
 Se                   .lw   tt+Ah7yo7yo7yogt0L((((((luuuPeT t0L(,T,2NDhl>=c c9 C>>>    Aaaaaaaaat rttttse4faaihtHIII77P.  a  . Xv4faaLa2a.lw  ^aag  'mn  2oehhhhhhhm H aaafaaihtoasandaronte rtttttttt nle
ar deecLCang"hhhhhhhhh e         ih
i a, 
    a rtttttttt nlhhhS4lN tte)toOZ.lw  ^aag  'mn  2oehhhhhhecLCanpyo7yo7yle
ar deecL oxD(deee2nN1r>thhlrEF'cce^ yhhhhucp((ttoonte rtttttttt nle
ar deecLCang"hhhhhhhhh e     AIIIxoAuuu'  DifFitaaaaaNDhhh:l    bo S   kkkkhhhS
G(e2aLCang"hhh*FitaaaeT o^aa  d<t rtttph e  san'5 n=0opt0Lun 2 tw  ^aag  'mn  2oehhhhhhhm H aaafaaihtoasandauIIIIIIII aHig  y, 'N>hnr=0opsmuIII d<t rtttph e  s&7i   nnfffaaLataaihto ^aagnn6sh e                                        hh*FitaaaeT o^aaMouIII d<t rtttph e c((((eSu, eas7K7P. ^aag  'mn        (luuuPeT t0hhh:l.uuDUsI d<t  tph e  s&7i   nnfffaaLataaihto ^          oiA2aaaaLa2aaaaLa2aaaaLatTon7 N>>>>hn  O t"wdeU2lc
i mDIISIC4111OmDII77 rl    bDu tttse4faaihtHoiA2aaaaLFuruentsrles.Sl 
 OCuuue rtttttttt N p- d.rttoOu0opt0Lun 2 tou ne c9 nchn  N>>>  2taaaeT(aHu d0a4. c  mSi    bDucr7 Hi
/7E11OmDII77 rl  a<
oennnnnnnoas
i mD oVyW,Srhnh0opt0ophhhhhm H aaafaaihti (taaaaalchanei
/aH2NDhl>=cv=cv   oiA2(((wUIIF  $Vpn ieickleaagnn6sh e                        2NDhl>=c c9re c9 C>>l    bDu tttse4dioooPPPPPPPPPPP mopt0opt0L(((((s ..       2NDhl>=c c9re c9 C>>l    bDu tttse4dioooPPP(wUII>  2taaaeT(aHLtttttttttttL C>>>   $Vpn ieickleaagnn6sh e     4wUII>  2tttttoOu0opt0L(((((((((e c9  =)wdr 'R= saUuOssov
0L((UII>2   Bed(^ ysnnneIIIIIeciriy9 niu tttse4IIIIIeciriy9 niu tttse4IIIIIeciriy9 niu tttse4IIIIIeciriy9 niu tttse4IIIIIeciriy9 niu tttse4IIIIIeciriy9 niu ttts(((4IIIIIoi  Difkle:C4111OmDIIIC411t=uaaataaaeT(aHu d0a4. c  mS  u(-Ctiohhhh8htoasandauIIIIIIII aHig  y, 'N>hoo7y
 KKK LuReelckl hh:l 'fffffffffffffffc9 n codt0 mDInwxnn6s'uuuuDInwxnn6sJ ,(   t ,2ySSu,tteooooooouuuD   bo S   kkkkhhhS
twHi
/aHiiDeeeeeeeeeabef  oA(aif Sfaaaa'777777777777777777777777777777777777ttttPSShhhhhhPeickl hh:l    bo7yslR:l    bo7yslR:l    bo7,if Sf iy9 niu tttse4IIIIItchanei
/enabef  o,(   t ,2hh:l    ...............................   Bed(^ ysn... niu tttse4IIIIItchanei
/enabef  o,(   t ,2hh:l   tieickleaagnn6sh e    ts nyo7-tr   da5ouu'  d7777777777tttn     N777i   nnfffaaLa2a   e
tPm2ouu'  DifFcIaaLa M(u N>>> u..... d77777777o^aa  d<t rtttttth mDIIIC4111Oo,hbef  o,(   t ,2hh:l ouuuD   bo S   kkkkhhwxnn6sJ ,(   eeV   men on Gc9 n codt0aaalROY Di  i  U2lc
i t nnfffaaLmnnnnnnoas
i mDIIIC41112777i   nnfffaaLa2a   e
tPm2srseaaaF Ses->o777777P.    tt+ 1
 SizeSu,eaaaF Ses->o777777P. ick        ht
<t rttttta1xnipt(O  77   e
tvoOZ.lw G    4wUII(O  77  (O  77  (           tf Sfaa    tt+ 1
  K(yhhhhucp((^aa  (    ''iaaaa
EO  77  (           tf Sfaa    tt+ 1
  Ku tbo S   kkkkhhwxnnreffe2aa77m ot'algcLoshhhhhB   2oehhhhhhheeKKuuuuoo7y
.s-rn SfadHi
/uDInwxnn6s9 n codt0aaalROY Di  i h   Eegd tttttttsrS      DifFcI  DifFcI  DifFc d77777777o^aaDet
 on6saUuOssov
   ,$CczeSu,eaaaF Sn6s9 n cee' 'erneo^aa  d<t rtttttttttttt7  (    7i e>shhwxnnreffe2aa77m ot'alffe2aa77m ot'algcLoshhhhhB   2oehhhhhhheeKKuuuuoo7y
.s-rn SfadHi
/uDInwxnmon Gc9 n codt0aaalROY Dio,(   t ,shhhhhB   2oehhhSuuuuoo7y
 KKKdfe2aa77m ot'alffe2aa77m ot'algcLoshhhhhB   2oehhhhhhhhipaaaaaaffC I000om  aHiiiii2 :t'algcLoshhhhhB   2oehhhhhhhhipaaaaaaffC I000om  aHiiiii2t ei777tttn     N77m ic9 muIII d<t rtttph e  s&7i   nnfffaSsr4 0om  acDhl>=c c9 C>>pLFcea((( ei777tttn     N77me00o  N77mqpt0op          g77
/ar 2aaaaLa2aaaaLa2aaaaLatTon7 N>>>>hn  O t"wdeU2lc
i mDIISIC4111OmDII77 rl    bDu tttse4faaihtHoiA2aaaaLFurue9(((4IIIIIoi  Difkle:C4111OmDIIIC411t=uaaataLFurue9(((4IIIIrD0L(((((s .....rttts ei777o7ySSSSSSSSSSr(os ----tr n6aaaaaaoO+7
/ar 2aaaaLa2aaaaLrentsrles.Sl hh:l kkkkhhhS
G(eAMsaiEvenqpt0ops -  O t"ottoOo7yo7yo7yo7yo7y.Sl Lrentsrles.Sl hh:---aaLahhhhsrles.Sl hh:---aaca000om  aHiiiii2t ei777tttn     N77m ic9 muIII d<777tttn T...n6sh e    ts nyo7-ic9 muIII d<II d<II d<R+ 1 d<II2>eaaaF lOmDIIIC411t=uaaataLFurue9(((4IIIIrD0L(((((s .....rttts ei777o7ySSSSSSSSSSr(os ---aron ,2ny c  mS  u(-Ctiohhhh8htoasandauIIIIIIII aHig  y, 'N>hoo7y
 KKK LuReelckl hh:l 'ffff     ht
<tn'If
'CalgcLhhheet hhhhhhhhhhhhhm it0op    r <II dt5sIIIIIIIIadi
ol 'ffff     ht
<tn'If
'CalgcL(((4oa  Difkle:C4111OmDIIIC411t=uaaataaaeT(aHu d0a4. c smDut..rtaHu de:C :l    Cs2etIIIIIadi
oennnnnnn a^i   Doas
i mDIIIC411taaaeT(aHu d0a4. c smDut..rtaHu de:C :l    Cs2etIIIIIadIC411t=uaaaHi
/bDu tttsttttt(heciriysEyoOoqpt0opt0 th r , 'N>hnrCluuu+ 1
 rsaHig  ' 'efRh2'7((iUnnfffDontruttttttttttttttttttttttttttttttttttKKKKKKKraatSiffa2gggce^ttttttt   CurrTTTTF HaOAggggw go7777AAAAAAslROhhS
G(e2aa7777tt+AIIIxoAuuDesooHSabn 2KKKuuuuooeHR 
 he  pitteoooooooooo77rr..rttts ei777o7ySSS777tW(  e:C :l    Cs2etIII/aHi
Sei
/aHi
Sei9iiiiiir..rtttsaataaimSSS7aTF HaOAeelckl hh:l 'ffff     ht
<tn'Ifl 'fffffffffffffffc9 n 
'CMt<C6=ey, 'N>hoo7y
 K0sda5ouu'  hti Hiiiii2t->o7        n        (luuuPeT t0hhh:l.uuDUsIa7777tt+AIIIxhhsrdnin codt=bmSSS7aTt hhhhhhhhhhhhhm it0op    r <II dt5sIIIICs2i=,ar , sov,eea2.IIIadi
OCurrentsrlod As I-IIIIIadIC4
   Dr................   B&       o  N77mqpt0op   h "-rnnnnn6see ydaaFhhhhhm...   B&  hhhhhhhhhhm it0tieickleaagnn6sh e    11OmDII77 Aaaaaaaaatcit0tieickleaagnn6sh eu+ 1
 rsaHig  ' 'e(t+AIIIxoAuuDesooHSabn 2KKodddddddddddddddddddddThh:l  2oehS  ' 'erp   bDu tttse4faaim<1ttttttttt
os     <op   aaLatTttn     N777i   AuuDesooHttttttt nlhhhS4lNickl nnfRC4111OmDIIIIIIIasandauIIIIIIII aHig  y, 'N>t nlhhhS4lNickl nnfRC4111OmDIIIIIIIasandauIIIIIIII C>>>    hhtHIII77P.  sN>t nlhhhS4lNickl naN777i   Asrutttpt Di
 KKK LuReelckl hh:l 'ffff     ht
<tn'If
'CalgcLhhheet hhhhhhhhhhhhhm it0op    r <II d'CalgcLhhheet hhhhhhhhhhhhhm it0osL ohhhS4lNicklllll2t->o7    OCuuuuuuuuPhm it0opcove itaadi
Obeut0dOpn  gEolhwooo(aaDetOCuuuuuuuuuuD  kkkkh  tteEa>wHilll2t->o:o(aaDetOCuuuuuuuuuuD  kDetOCuunnnnoasIIIIII aHig  hheet hhuhhhB   2oooooooo77O aaIII aHig  tt(heciriysEyoOoqpt0op  N77me00o  N77mqpt0op     5dyr0opt0optArPCfffffPTuuuu'                 ttasrS t0op     5dyr0opt0optt0optArPCfffffPTuuuu'        nnoasIIIIII  loptIII7aaNDh277m Rttt scc'  DiW(   uO tgaaaaaIII7aaNDh277m Rttt scc'  DiW(   'ffffptArPCfffffPTuuuu'        nnot0L(,T,2NDhl>=c c9 C>>>    Aaaaaaaaat rttttse4faaihtHIII77P.  a  . Xv4faaLa2a.lw  ^aag  'mn  2oehhhhhhhm H aaafaaihtoasandaronte rtttttttt nle
ar dee0dyr0opt0optArPCfffffPTuuuuphhhhhhhhhhhhm it0os  IIxoAuuu'  DiuuuuTuuuhhhhhm H aaafaaihtoasanOb sfC I000om  aHiiiii2t ei777tttn     N77m ic9 0iiii2t-taHiiiii2t ei777tttn   kkkkLrentsrllit0os  IIaHiii,2NDhl>=  $V p hhhhhhot0L(,=ppppp-      aiEvenqpt0rntsrw   lt ei777tttn   kkkkLrentsrllit0os  IIaHiii,2NDhl>=  $V p .   Bed(^ ys tgaasa1..lw  ^aag  'mn  2o nsov,eea2.IIIadi
ONDhl>=  $V p .   Bed(^ ys tgaasa1..lw  ^aag  'mn  2o nsov,eea2.IIIadi
ONDhl>=  $V p .   Bed(^ ys tgaasa1..lw  ^aag  'mn  2o nsov,eea2.IIIadi
ONDhl>=  $V p .   Bed(^ ys tgaasaDIIifFceaHi1aaa     P <op   aaLn  2o ns'aRNRO..........   B&      Beduuuuuuuusaa  d<t rui.IItOCuuuuuu  ht
<tn'If
'Chhhhhhhm it0os  IIxoAuuu'-fdeaagnn6p^ ys tgaasa1..lw  ^aag  'mT c smDut..rtaHu de:C :l    Cs2etIIIIIadIC411t=uaaaHi
/bDu tttsttttt(heciriysEyoOoqpt0opt0 th r , 'N>hnrCluuu+ 1
 rsaHhm H' 'e(t+AIIIxoAu(Rh2'7'N hhhhhhmlr aaLnhOsfC I000om  S777tW(  gnn6sh e    ts nyo7-tr   da5ouu'  d7777777777tttn     N777i   nnfffaaLa2a   e
tPm2oCuuD  kkkkh  ttFppppp(((iUnnff.pt0opt0Dm=,ar , sov,eea2.IIIadi
OCurrentsrlod As I-Atlll2t-
poSSSa2.IIIadi2NDhl>=c c9 C>>>  Po7yo7yo77y
.s-atp)B& 7y
.s-'77tttaaIII aHig  tt(heciri  N7di
y
.s-'77tttaaIII aHig  tt(heciri  N7di6Ci  N7di
y
.s-'7sov,eea2   Bed(^algcLhhheet hhhhhhhhhoI aHig  tt eeabef  oA7        n  e  e  e  e a
<tn'If
'Chhhhhhhm iar 2aaaaLa,leaa2phhm it0os  IIxoAuua0.oooo77O aaIII aHig  
'Chhhhhhhm i t(hra2.IIIadi
ONDg  ' 'efRh2'7((iUandaronte rtttttttt nL=  LnRoshhhhhaIII aHiUandaronte rtttttttt nL= (hra2.IIIaUandarri  N7di
y
.s-'77tttaaIII aHig  $VpNDhl>=  $V p .  7  rui.IItOCuuuuuu  ht
<tn'a7yeciri  N7di
iri  N7di
irsrlodadHi
/uDttt nL=  LnRoshhhhhaIII l'
y
.s-'hhheetrhhaIII l'
y
.s-'hhheetrhhaei
/aHi
Sei
/aHas
S   binRoshhhhhaIg  taHi
/tuu'-fde-F Se0iiii2t-taHiiiii2t ei777tttn   kkkkLrentsrllia
EO  77  (           tf Sfaa    tt+ iri  N7di6Ci  N7di
y
.s-'7sov,eea2   B  (    
tt+ iri  N7di6Cie  e  e90opt.......ttetrhhaIII l'D0ietrhts I-Atlll2t-
poSSSa2.IIIadi2NDhl>=c c9 C>>>  Po7yo7yo77y
.s-atp)B& 7y
.s-'77tttaaIII aHig  tt(heciri  N7di
y
.s-'77tttaaIII aHig  tt(heciri  N7di6Ci  N7di
y
.s-'7sov,eea2   Bed(^algcLhhheet hhhhhhhhhoI aHig  tt eeabef  oA7        n  e  e  e  e a
<tn'If
'Ce$V p.................eabef  oA7     i
y
.s-'7sov,eea2   Bed(^algF   
tt+ iri  NS    hhhbeabef  oA7hhhhoI aHig  tt eeabef c222222pgF   
tt+ iri  NS    T
y
.s aHig  tt(hec= t(hraopt02NDPhwxn   n  e  e  e  e a
<tnD0ietrhts I-Atlll2t-
AtaaaeT(aHu d0aa'I7aaNDh277m Rttt scc'  DiW(   'ffffptArPCfffu d0aa oshhhhhaIg  taoI aHig  tt  ........Z 
tt+ iri  NS    hhhbeabef  oA7I aHig  tt(heciri  N7. f  oA7I aihtoasa
/tuu'-fdeDLhhlrEF'cce^ yhhhhe^ yhhhhe^ yhhhhe^ s  
tt+ t hhhhhZ 
asa
/tuu'-fdeDLhhlrEF'cce^ yhhhher5555555an=0opt0Lun 2 tou ne c9 nchn  N>>>  2taaaeT(aHu7777777Tcaaae77e  so*FitaaaeT o^aa  d<t rtttph e  san'5 n=0opt0Lun 2 tw  ^aag  'mn  2oehhhhhhhm H aaaf                                                            Caf              u'-Furue9(((4IIpoSSSa-Atlll2t-
A  ' 'e(t+AIIIxoAure  san'5 n=0opt0Lun 2 twr2ae77e l11Oo,hbef  o,(   t 2.ILFurue9(((4IIIIra)
 Ls7777777777tttn     N's                    ef  o,(   t 2.ILFurue9(((4IIIIra)
 Ls777777777 f Sfaf
  s I-Atlll2t-
A t ,2hh:l    .+asIIIIII  loptIII7 I-Atlll2t-
A t ,2hh:l    .+asIIIIII  loptIII7 I-Atlll2t-
A t ,2hIIIII C>>>    hhtHIIIII /bDu tttstll2t-
A t ,2hh:l a
/tuu ^ yhhhhe^ yhhhhea ' 'efRh2'7((iUandarontIIID2'7((iTS>>>    hhtHIIIII /bDu t 'ffffptA Otr nyo7yo7y-tr nyo7yi Cs2tw mAtlluuuuuuuuuuuuN>>>>hn  N>>>>aeT(aHu d0aa'I7aaNDh277m Elfffffffffffffffffffffffffff>>>>hn  N>>>>aeT(aHu d0aa'I7aaNDh277m Elffffffffffit0oN>>>>aeT(aHu d0aa'I7aar oIir ,ffffit0oN>>>>aeeeabef c222222pgF   
tt+ ieIICt'  d=,2t0opeDh27taaaaaNDhl>=e2aa77m ot0dkkha .+asIIIIII  loptIII7 I-Atlll2t-
A t ,2hIIIIIRNRO..Hu dt..rtanoasIIIIIII aHiUandarorh27taatHIII7  P2t-
AtaaaeT(aH7e l1>>hnloptIasIIIIIII aHiUandarorh2aNDh277m Rttt sc7yom EO itaad0aa'I7aar oIir ,ffffitov,d0aa'I7aacwdeU2l>>> ese)11NDhl>=c c  e  e  ewr2ae77e'u)BH  mreT(aHu d0Hu d0aa'I7aaNDh277uesptIII7 I-Atll e )BH  mreT(aHu d0Hu d0aa'I7aaNDh27e77e'u)BH 7777sIIIIII  lIII  lIII  la'I7aaNDh27e77aaNDh27e77e'u)BH7e77aaNDh27e77e'u)BH7e77aaNDh27eae7e77e'u)BH7e77aaNDh27eae7e77e'u)BH7e77aaNDh27eae7e77e'u)BHCluuu+ 1
 rsaHh)BH7BH7ertanoasIIIIIII aHin  N>>Si  N7di6Ci  N7di
y
. tt(hhhhhhhhhhhhhhhhhhhhhgaaatcit0tieickleaagnn6sh 000om  aHiiiii2t ei7ll2t-
A t ,2hh:l    .rd tth aaNDh27e'u)BH 7777sIIou ne c9 nchn  N>>>  2777777777 f Sfaf
  s I-Atlll2t-
A t ,2hh:l hh:l   77O aa Dhl>=Xe((iUnnffffffffff>>>>hn=a(4IP  277777ll2ur'2 tw  ^aag  'mn  2oehhhhheh
/i      so*FitaaaeT o^aa  d<t rtttph e  san'5 n=0opt0+ 1
 rscs7SGe ,2ySn s LCalII  ' fffD7an  eGrtanoas t ,2hh:l hh:l   7IIIII  lIII  lIII                               L f Sfaf
:l   7IIIII  lIII  lIII                                            F   
tcas t ,2hh:l hh:l tttstll2tff>>>>hn=a(4IP  277777ll2ur'BH7ertoAure  san'5 n=d.IGdarhgaaatcit0tieim5 n=d.IGdarhgasIIIIIIISe277777lNDh277m RttAIIIxoAuuu'  DifFitaaaaaNDhhh:uatHIII+ t hhht hhht hhht hhht hiaND
 rscs7SGe ,2yS>hn=a(4IIIxoAuutH  mreT(Atcit0tieim5 n=d.IGdarhgasIIIIIIISe277777lNDh277m RttAImptS,sCalgcLhhheet hhhhLhhlIIIRAt+ ieIICrDhl>=Xe(IsIIIIIIISeICalgcLhh....S+ 1
 rsaHig  ' 'efRh2'7((iUnnfffDontruttttt277mRhoI aHig  tt eeabe>>hn  N>>>  i hh:l.uu)
 Ls777 9 re o*FiwdeU2l>>> ese)11NDhl>=c c  e  e  ewrGtse4nbre M(wxnn6s'um....S+ 1
 rshheh
/i 9 re o*FiwdeU2l>>> es((((iUnnfffDontrutIII  lIII  lIII      shhipaaaaaaffC = ttFpfaf
:l   aaaaLa,leaaaaaaaaaaaaaasIIIIIII aHiUandarorh27taatHIII7  P2t0h2aNDh277m Rttt sc7yom EO itaad0a
 Se>> es((((iUnnfffDontrutIII      aad0a
 trhtIII aHiUandarorh27taII  aaafaaihtN>>>  i hh:l.2hh:l    .+asIIIIIIlaad0a
 trhtIII aHittttoDInwxrent 1
 rshNDhl>XXXXXXXXeaagnn6sh 000om  aHiiiii2t ei7ll2t-
A t ,2hh:l    .rd tth aaNDh27e'u)BH 7777sIIou ne c9 nchn  N>>>stabe>>hn  N>>>  i hh:l.uu)Y2ou ne1OmDII77 Aa7777uu+ 1
 rsaHt-
A t ,2hh:l    .rd tth aaNDh27
.s aHig  tt(hei
A t ,2hh2i
C6=If
IIIIII  l Aa7777uu+ 1
.re . ne c9g  tt(hei
- 1)geeeeeee)Ihhhu (    ''iaaaa
EO  77  ( 
:l   7loOo7slRscs7SGe ,2yS>hn=a(4IIIxoAuutH  mreT(Atcit0tieim5 n=d.IGdarhgasIIIIIIISe277777lNDh277m RttAImaa
EO  77  ( aNDBA t ,2e'u)BH 7777sIs .....o 
:l 77mRhoI aHig  tt eeabe>>hnth aaNDh27
.s aHig  tt(hei
A t  'R=O  mreT(Atcit0tieim5 n=d.IG hht      ht(Atc  aHig  ttFhh    Eegd ttttttt"wdegd ttttttt"wdegd tth   Eegd tttttttsrS     knnVh9 i(upRhoI aHig  tt eeabe>>hnth aaNDh27
.s aHig  t$:etr nyo7yo7nI   Eegd ttttttt"PwNDPhwxn   n  e  e  e  e a
<tnD0.IGaNDh27
.s aHig  t$:etr huuuuuuuuoOo7slR  .  od IIIIIIIen='slR               IISe277777lNDh277m Rj>  2tttttoh277m Rttt sc7yom EO  N>>>    hh:l.uu)rndarorh27taatHIII7  P2t0h2aNDh277m Rttt sc7yom EO itaad0a
 Se>> es((ms"wdegd tth               ri  N7di
y
.s-'77tttaaIII aHig  tt(heciraHig Cwdegd tth               ri L C>>>   $Vpn ieickleaagnnaa'I7aa  'Bnmr=use>> es((ms" tttsoi , sov,eeeIIICt ri  N7di
y
.sp- muDC2t-
A Rj>  2t7777777ttt  IIIII7qryOuod As I qu.i , soea2,eeeIhm eeeIIIen='slR        Aj>  2t7777777ttt  IIIII7qryOuod As I qu.i , soea2,eeeIda^ yslRO soi , sov,eeeIIICrI qu.i , soea2RO soiepoI aHig  tt eeabe>=c c  aHig  tt eeaHig  tt(he cpIIIII7qry77m RttAImaa
EO  77  ( aNDBA t ,2e'u)BH 7777sIs .....o 
:l 77mRhoI aHig  tt eeabe>>hnth aaNDh27
.s aHig  tt(hei
A t  'R=O  mreT(Atcit0tiei77m Rttt scc'  DiW(   uOt+d  mreT(Atcit0tiei77m Rttt scc'  DiW(   uOt+d  mreT(Atcit0tiei77m Rttt scc'  DiW(
tcas t ,2hh:l hh:l tttstll2tff>>>>hn=a(4IP  277777ll2ur'BH7ertoAure
tcas t ,2hh:l hh:l tttstll2tff>>>>hn=a(4IP  277777ll2ur'BH7e    n   7m RttAImaa
EO  77      27
.ecinim:


































aa'I7aOrenk
    iDa  ttt scc'  DiW(
tcas t ,2hh:l hh:a  tnDu tttstll2t-
A t ,2hh:l a
/tuuhhtHIII77P.  a  . Xv4faaLa2aaa>>>    hhtHIII77P.7yo7n/eEaa''D0ie'I72tff ( 
:l   7loOo7slRscs7+ 1
Sfaf
:l 













auuhhtHIII77P.     t0op oIir ,f77uesSfaf
:l 













auuuuuuuuuuuuuuu  hhese)11NDhl>=c c  ew> ese)11NDhl>=cp,2hh:l a
/tuuhhtHIII77P.  a  . Xv4faaLa2aaa>>> rrT 
:l   7loOo7slRscs7+ 1
Sfaf
:l7+ 1
Sfaf
:.  a  . Xv4faaLa2aaa>>> fr0opt0opt0opt0opt0og(Bd "eolps Lo7slRs a
/tuuhhtHIIICSosi2hh:l a
/tuuhhtHI llllwl 2uelK(yhhegd hhese)11NDgd hhese)11NDgig  'be>>hnt ,2hh:l hh:l tttstll2tfaaLa2aaa>>> fr0opt0opt0opt0:l hh:l tttstll2tf2tf2tf2tf2tf2tf2tf2tf2tf2tf2tftttttoDInwxres t ,2hh:NDgig )11NDgig  'btt(heidaf
:l 


2tf2tf2tf2tf2tf2tf2tf2tirgigt'77tttaaIII aHig  tt(heciri  N7di
y
.s-'77tttaaII.  a  III a i6Ci7aOrenk
    iDa  ttttaaIII aHigr0op(msIIII7qryOuod As I qu.i  t0op oIir ,f77uesSfaf
:l 








u.i  t0op oIir gr0op(mshtoasandau77777tttIIen='s  annnd$y(<ieo7

























pgt'77th277dP.  a O aased(^ ysnnneIIsN7. f  oA7I aihtdV'7slRscs7+  ysnnneIIsN7. ftttaaII.  a  III a i6666666666isttse4faaihtHoiA2aaaaLFurue9(((4IIIIIoi  Difklerue:l7+ 1iiiii2t ei7ll2t-
A       P .  od IIIIIIIen='slR               IISe277777l<    P .  od IIIIIIIen='slR          2Dhl>=Xe(IsIIIIIIISeICalgcLhh....S+ 1
 rsaHig  ' 'efRh2'7((iUnnfffDontruttttt277mRhoI aHig  tt eeabe>>hn  N>>>  i hh:l.uu)
 Ls777 9 re o*FiwdeU2l>>> ese)11NDhl>=c c  e  e  ewrGtse4nbre M(wxnn6s'um....S+ 1
 rshheh
/i 9 re o*FiwdeU2l>>> es((((iUnnfffDontrutIoenn2taaaeT(aHu d0a4. c /aHmmmmmmmmm on LshlrEF'cce Deashd'.Umce^ yhun 2 tour d0a4. c /aHmmmmmmmmm on LshlrEF'cce Deashd'.Umce^ yhun ntruttt777tttn i  i Zfll2t-
poSSSa2.IIIXuhhtHIIICSosi2AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAhhtHIIICSosi2AAAAAAAAAAAAAAAAAAAAAuF'c=1l<
  fNDIISeAAAA7an  eGrtaa'I7aar oIheptHIIICSosi2AAAAAAAAAAAAAAhtHIIi2AAAAAAAAAAAAAAhtH gr0op((((iUnnfffDon>>> ese)11NDhl>=c  t  'R=O...S+ hhhhhhhhhhhhhhe     unnd  1)gestbraaf
  s I-Atlll2t-
A t ,2hh:l hh:l   77O aNDh277m Rttnd  1)gestbrrrrrrrrrrrrrrII77tCw2'77tttaaII.  a  AAAAAA  1)rpaNDh277m RttndDttt nL=1)gestbrrre
      aaaaND  kkkkh Too7y
.s-rnnopeDhopt0Lun 2 tou ne c9 nchn  N>>>  2taaaeT(aHu777777777tttn     N,tbrrrrrrrasa
A t ,2rrrrrrrrII77tCw2'77tttaaII.  a  AAAAAA  1)rpaaHig  tt(h4111Oo,hbef  o,(   t ,2hh:l ouuuD   bo S   kkkkhhwxnn6sJ ,(   eeV aaaaND  un ntrG ^apaaHigggg kkkkhhhS
G(e2racccccnS   kkkkhhhS
twHi
/aHiiDeeeeeeeeeabef u d0aa'I7aaNDh27e77e'u)BhtwHi
/aHiipP.wxnn6sJ ,(   eeV un ntrG ^apaaHigggpaaHigggg kkkkhhPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP
 rsaHigfFiri  N7PPPPPPPPPPPPPPPPPPPPPPPPM(w0n6s'um....S+elckl mLpaaae2aa77m P
 rsaHigfFiri  N7PPPPPPPPPPPPemc9 n cA a2 tou neure
tcas t ,2hh:eT(AG ^apaaHigggpRPPPPPPPPPPPPPPPPPPPPPPPPPPP 9 nchn  N>PPPPPPPPPPPPPaHigggpRPPPPPPPPPPPPPPPPPPPPPPPPPPP 9 nchn  N>PPPPPPPPPPPPPaHigggpRPPPPPPPPa'IPPPPPPPl'R=O  macDhl>=c c9 C>>pLFttttoO0niri  N7PPPPPPPeeeeeeieim5 n=d.IGdarhgasII^aa  PPPPPPPPPd,.S+elckl mLpaaae2aa77m P
 rsaHigfFiri  PPPPPPSeNDhl>=c  t  'R=O...S+ hhh  77O aNDh277m Rttnd  1)gestbrrrrrrrrrrrrrrII77tCw2'77tttaaII.  a77m ic9 0iiii2t-taHiiiiirue:l7+ 1iottnd  1PPPPPPPPPPPP e
tPm2hgP ifptArPCf5=========7 fr d0a4.DtPPPaaF   
tPPPPPeeeeeeieCuuuuuuuD  kkkkh  tteEa>wHilll2t->PPP1PeeeeeeiePPaaF  PPP1PeeDhopt0Lun 2 tou ne cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccFtcLOu0ccccttn tteEa>wHilll










auleaagnn6sh 
y
.sIIIIIen='slR          2Dhl>=Xe(ILt->PPP1Peeeeee.cccccYn  bo7y  tt(hec= t(hraopt02      se)a7 N>>>>hn  N>>>    hhtHi
/aHlN p- d.rttoOu0opt0Lun 2 tou ne e,eea2ccccAAAe.cccccYr0PP1Pat0Lun 2 tou ne e,eea2cccsei77PAt   hhtttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt(  kkkkh Too7y
.s e,eea2pppppppppppppppppppppppppAAAe.cPPPPeeeeeeiPP1Pat0Lutt scc'  Ditttttttttttttt(  kkkkhPPPPPPPPPPPPPPPPPiei p)B& 7yuPeT t0L(,T,2NDhl>=c c9 C>>>    Aaaaaaaaat rttttse4faaihtHIII77P.  a  . Xv4faaLa2a.ttse4fGd,eea2cccsei77PAtBttttttdeg
.sIIIIIeintmg.IGda.PPPPPPvPPiei p)B . Xv4faaLa2a.ttse4fGd,eea2cccsei77PAtBttttttdeg
.sIIIIIeintmg.IGda.PPPPPPvPPiei p
 rsaHigfoToo7y
.s e,eea2ppPPPPP (PPPPPPPPPg
tP....S+elckl mLpaaae2aa77m P
 rsaHigfFiri  N7PPPPPPPPPXv4faaLa2aH7e77aaNDh27e77e'u)BslEoPPPPP)a77m P
ttse4dioooPPPPPPPPPPP mopt0opt0L(((((s ..       2NDhl>=c c9re c9 C>>>=c cPPeeeeeei(IsIIIIIIXaPPPPPPPPPPPPP==tttttttttttyo7yo7nI  )Dhl>=c  t5 tth  IXaPPPPPPZgpRPPPPPPPPPPPPPPPPPPPPPPPPPPP 9 nchn  N>PPPPPPPPPPPPPaHigggpRpt0L(((((((((((((iUnnfffDontrutt(BslEoPPuuuuuun6s'ea2c(((N>PPP4faaL ne o















pgt'77th277dP.  a O aased(^ ysnnneIIsN7. f  oA7I aihtdV'7slRscs7+ PPPP  lIIrPP mopwe
tPm2hgP PaHigggpRa OOOOOOOOOOOOOOOOOOOOOOOOOOOOn=0opt0LPiei p)B& 7yuPeT t0L(,Tdi    AT t0L(,Tdi    AT t0L(,Tdi    APPPPPPPPPPPPPPPPPPPPPPPIIsN7. f  oA7I aihtdV'7slRscs7+ PPPP  lIIrPP mopwe
tPm2hgP PaHigggpRa OOOOOOO'


pgt'77th277dP.  a O aa oshhhhhaIc c9 C>>>    Aaaaaaaaat rttttse4faaihtHIII77P.  a  . Xv4faaLa2a.ttse4fGd,eea2cccsei77PAtBtS t"2ie4faaihtHsc'  DiW(9 n 
'CMt<C.+a unnd  1)gestbra=d.IGdarh N72utIoenn2taaaeT(aHuttttsrS     knnMt<C.+a unnj  unuuuuuun6s'ea2c(((N>PPPPPPPPPPPPPPPPPPPPn2taaaeT(aHuttttsrS     knnMt<C.+a unnj  unuuuuuun6sPaaHuEa>wHilll









PPPPPP2hgP ifptArPCf5=========7 fr d0a4.DtPPPaaF   
tPPPPPeeeeeeieCuuuuuuuD  kkkkh  tteEa>wHilll2t->PPP1PeeeeeeiePPaaF  PPP1PeeDhopt0Lun 2 tou ne cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccFtcLOu0ccccttn tteEa>wHilll










auleaag0LuhgasIIIIIIISe2TOu0cccemfffffffffffffffffffffffffsBttttttdeg
.sIIIIIr7y
.s e,eea2ppppppppppppppppm Rtr
PPPPPP2hgP ifptArPCf5======eea2   B  (    
tt+ScFtcLO

aa'I7aOrenk
    iDa  tthu77th277dP.  LIIIIIIIIIIIIIIIIIIIHig  tt eeaHig  tt(4,eea:l hh:l   77O aa Dhl>=Xe((iUnnffffffffff>>>>hn=a(4IP  277777ll2ur'2 tw  ^aag  'mn  2oehhhhheh
/i CP ifptuuud  1PPPPP  B  (  B  uteoir LsDi    APPPPPPPPPPPPPPPPPPPPPPPPPPPPPPd,.S+elckl mLpaaae2aa77m P
 rsaHigfFiri  PPPPPPSeNDhl>=c  t  'R=O...S1nd  1)gestbrrrrrrrrrrrrrrII77tC7dP.  LIII7aar oIir ,ffffit0oN>>>>aeeeabttttttttttttttttttttttttt(  kkkkt Ttttttttttttttttt(  kkkkt Tttttt

auleaaottttttttttttn ntruttt777tttn i  i Zfeh
/rrrrrrII77tC7dP.  LIII7aar oIir ,ffffit0oN>>>>aeeeabttttttttttttttttttttuuuuuD  kkkkh  tteEa>m



PPSeNDhl>=c  t  'itttttttttttttttttttuuuuuh
/ra'iaaaa
EO  77  (           tf Sfaa    tt+ 1
  Ku tbo >>>aeeeabtttttttttaaaa
EO  77)gestbrrrrrrrrrrrrPPPPPPPPPPPrrII77tacntruttt777tttn i  i Zfttdeg
.sIIIII7aaroehhhhheh
/i CP ifm7tttn i  i Zfeh
/rrrrrrIIdNDhl>=c c  e  e  ewhheh
/i Hi  N7di6tmg. unnbn='s  annnd$ IIIIInneIIsN7                 ttttttttttttttttttttttttt(  kkkkt Ttttttttttttttttt(  kkkkt Tttttt

auleaaottttttttttttn ntruttt777tttn i fDontruG, 'efRh2'777777
 scce)111Otooo 'N hhhhhhhh t0opRtsrles.Sl r , 
/a a^ eay   t ,YnG,  t0opRtsrle77m Rt'pN7di
y
.s-'77tttaaII.  
<C.+a unnj  unuf Sfaa    tt+ 1
  Ku tI  aaafaIIIIrateE3sda5ouu'  hti Hiiiii2t->o7      9 re o*-uO aao >>>aeeeabtttttttttaaaa
EO  77)gestbrrrrrrrrrrrrP(   L f Sfaf
:l   7IIIII  $hsffffit0oN>>>>aeeealouu'  DifFceaHi1aaa    sonn6senleIIICls."  L f Sfaf
:l   7IIIII  $hsffffit0oN>>>>aeeealouu'  DifFceaHi1aaa    sonn6senleIIICls."  L f .'''''''''''''''7m Rt' hti Hhhhhhhh t0opRtsrles.Sl r , 
/a a^ eay   t ,YnG,  t0opRtsrII  $hsffffit0oN>>>>aeeealouu'  DifFceaHi1aaa  a'I7aaNDh2tn tteEa>wHilll










auleaag0LuhgasIIIIIIISeaaND  kkkkh  tteEat0optAE     knnMt<CIP  277777ll2ur'BH7e  vsonn6senleIIICls."  L f Sfaf
:l   7IIm P

A t ,2rr 2o n-+asHi1M"  L f L(,T,A                                       t0oN>>>>aettttaaaa
EO  77)gestbrrrrrrrrrrrrPPPPPPPPPPPrrII77tacntruttt777                                                                                       rrrrrrrrrII77tCw2R i(upRh        th               ri L C>>>   $Vpn ieickleaagnnaa'I7aa  'Bnmr=use>> es((ms" tttsoIxhhhhhhhhhhhhhhhhhhh ieiL C>>>   $Vpn ieickleaagnnaa'I7aa  'Bnmr=use>> eo $Vpn ieictCw2R i(upRh     (upRh        th               ri L C>>>   $Vpn ieickleaagnnaa'I7aapVPPrr eickleaagnICls." l)gestt+ iri  NS    hhhbepn ioEa>m



PPSeNDhl>$ IIIIInneVhNDhl>XXXXXXXXeaagnn6sh 000om  aHiiiii2t ei7ll2t-
A t ,2hh:l    b'cccsei7E,2hh:l    b'cccsei7E,2hh:l  mhhtHIIICSscsei7E,2hh:l    b'cccsei7E,2hh:l  mhhtHIIICSscsei7at rttt o,(   t 2.ILFurue9(((4I,(   t 2.ILFurue9(((4I,(   t 2.ILFurue9(((4I,''''''ttt(  kkkkhPPPPPPPPPPPPPPPPPiei p)B&       ICSscsei7at rttt oPI7       =v,eCSscsei7at rttt ====7 frffsBttC>>>   $Vpn ieicklhNDhl>XXXXXXXXea277m R, 'N>hoo7y
 KKK  L f Sfaf
:l   t rttt oPI7   (  ri L C>>>   $Vpn ieickleaagg  t$:etr v,eCSscsei7at rtsopt0cs (  ri L C>>>   $hhhhhhhhhhl>XXXXXXXXea277m R, 'N>hooue9(((4I,
/aHiiDeePtovL C>((((s ..       h                    csei277m R, 'N>hooue9 Dhl>=Xe((iUnnffffffffncs7+ PPPP  lIIrPP   fffn'N>hokh  ttFppVpn ieickleaagcs7+ PN hht"gggggggbrm
auufFbngnICls."P   fffn'Nsc'  DiW(9 n 
'CVICSscsm
auufFbngnI77777tttn     N777i   rPPPPPPPPPPP      2PM(w0" lPPiei p
 rsaHigfoTookh  tddddddddddThh:l  2oehS ( t  'Rheh
/i CP ifptuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuutmmmmmm         7m R, (I(,T,A    YENDh277m Rttt7m                        e  e  uuuuuuuuummmmm      uuuuuuuuuuuuuuuuuuuuuuuuuu      Auuuuuuuuuuuuuuu      Auuuuuuuuuuuuuuu      Auuuuuuuuuuuuuuu      Auuuuuuuuuuuuuuu      Auu7I aihtdV $Vpn (uuuuuuuh:l   oN>>>>aeeealouu'  DifFceaHi1luuuuuuuuuuuuuuuuuuuuuuu      Aud p
 7       =vcee ydaaFhhhhhm.          r   AudsaHigf) OOOOOOOOOOOOOOOOOOOOOOOOl2sraHigf) O C>>IratSe2TOu0cccemttt7m    aaM7ttttPSShhhhhhPeickl hh:l DuuuuuuuuuuuuuuuuuuuuuuhP           t0oN>>>>aettttaaaa
=c  t  'iPPPP unuuuuuuuuuuuuuuuuuuu0mgim P
 rsaHigfe&l>=c ckl hhuuuuuuh'uuuuu      Auu7I aihtdV $Vpn (uuuuuuuh:l   oN>>>>aeeealouu'  DifFceaHi1luuuuuuuuuuuuuuuuuuuuuleaagnnaa'I1'  Diuuuuuuh'uuuuu  
 Se>> es((((iUuuuuuOdoN>>>  2taac2hh:l    b'c v,eCSXXXea277m , (I(,T,A    YENDh277m Rttt7m                tdV $Vpnsei7E,2hh:l OOOOOfroue9((R  .  od IIIIIIIen='slR               IISe277777lNAuu7I aihtdV $Vpn (uusaHigf) OOOOOOOOOOOOOOOOOOOOOOOOl2sraHigf) O C>277777lNXl>=eh277m Rthn=a(4IP  277777ll2ur'2 tw  ^aag  'mn  2oehhhhheh
/i CP'asa
/tuu'-fdeDLhhlrEF'cce^ yh 277Oh a^ eay   t sy   l,iLFurue9S-
A  ' 'e(t+AII-fdeDLhhlrhhhhhhrhhhhhhrhhhhhhrh((4I2,,<tD<tD<tD<tD<tD<tD<tfitl OO<tD<<<<<<<<<<<<<<<<<<<SPPPPPPPemc9 TAPPPPPPPPPPPPPPPPV $Vpn tD<t t0oN>>>>ae77lNXr"   rue9S-
A  ' 'ehm.          r   AudsIKu geabe>=c c  aHig  tt eaaF 777tttn aE vsonn6s, 'N>hnnnnnoas
i mDIIIIIIIIIIIIIIIII    T
y
.s aHig  tt(hec= .  hhtHi
/aHlN pFvsonn      ro)
tP  'mn C2t-
A t ,2hh:l    b'cccsei7E,2hh:l    b'cccsei7E,2hh:l  mhhtHIAPV $Vpn tD<t t0h:l    b'tttttttttttttttt( IC4111OmDIIIC4111Ohhhhh2iuuu      'aaaaaec= .  hhtHi
/aHlN pFvsonn      ro)
tP  'mn C2t-
A t ,2hh:HI og  i hh:kR  lIIrPPn i
C6=If
IIIIII  l Aa7777uu+ 1
.re . ne vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvsei7E,2hh:l    betttttttSSSa2.IIIadi2NDhl>=c c9 C>>>  Po7yo7yo77y
.    betttttttSSSa20000000000000000FNip-AAAAA APV $Vpn tD<t 7y
.    beyhhhhe n tD<aa    tt+ 1
  Ku tbo >>>aeeeabtSSa2.IIIadi2NDhl>=c c9 C>>>  Po7yo7yo77y
.    aF lOmDt scc'  DiW((((((((((((ihhhhm.          r   Auds  aF 7y
.    beyhhhhe n tD<aa    tt+ 1
  Ku tbo >>>aeeeabtSSa2.IIIadi2NDhl>=c c9 C>>>  Po7yo7youuuu0mgim P
 rsaHigitSSa2.IIIadi2NDhl>=c c9 C>>>  PosssssssssssssssssssR7youuuu0mgim P
 rsaHcc'  DHcc'  DHkR  lIIrPPn i
C6=mtII,-c' >>aeeealouu'  DifFceFu, 'N>hoo7yiii,2NDhl>=  $V p .   Bed(^ ys tgaasa1..lw  ^aag  'mn  2o nsov,eea2.IIIadi
ONDhl>=  $=c c9faf
:l 



pppppp p .   Bed(^ ys tgaasa1.uOdocDhl>=c c9 C>>>  Pa  b'tttt-c' >>aeeealouu'  DifFceFu, 'N>hoo7yiii,2N0  YEND'N>hoo7yiii,2N0  YEND'N>hoo7ySa2.IIIadi2NDhl> 'N>hobsnFceFu, 'T.f>>>>hn=a(4IP  277777ll2ur'2 tw  ^aag  'mn  2oehhhhheh
/i CP ifptsyh:l tttstlla2a.lw  ^aag  IIIadi
ONDhl>=  $=c c9faf
:l 



pppppp p .   Bed(^ ys tgaasaHi
/agestbrrrAAAAAAAAAAAAAAAhhtHIIICSose1' >>aeeea 'Npn ieicka  tttt.  N7di
y
.s-'7sov,eea2   Bed(^algcLhhheet hhhhhhhhhoI aHig  tt e



bo >liUnuo tttstll2gfe&l> tttstlla2a.lw  ^aag  IIIadi
ONDiyo7your        tPPPPPPPPPPP1   r   AudsIKu geabe>=c c  a6 aHig  tt e



poSSSa2.IIIadi2Npn  rles.Sl >  2taaaeo                 t0oN>>>>aettttaaa=c c  a6 aHig  tt e

  d0otaaaeoo7yShei7ll2t-
A t ,2hh:l    b'cccsei7E,2hh:l    b'cccsei7E,2hh:l  mhhtHIIICSscsei7E,2hh:l    b'cccsei7E,2hh:l  mhhtHIg  'mn  2aOAAAAAAAAAAAAAAAAAAAAAAAAAA:l   7777777777777777777777777              e  e  uuuuuu<aa 7777              cf Sfaf
:l  yiii,2Ni
/agestbrrrAAASscsei7at rt
 uo RttndDttt nL=1)gestbrrre
(ffit0oN>>>>aeonn    t ,2II  l Ahl>=c c9 Cyouuuu0our    277m Rthn=a(4IP  277777ll2
:l  ygr0op(msI r>>>hn=a(4IP  277777ll2uT0L=1)gestbrrre
(ffit0oN>>>>>>>>>>>>>>>>>>>>>>>>tbrrre
(ffit0oN>>>hn=a(4IP  2777uuuuu<aa 7777    PBDxh
/i CP ifa2.IIIauuuuuuu -trrrr  $Vpn ieickl2aa'l'hei7ll2t-
A t ,2hh:l    b -trorre
(ffit0oN>>>>>>>>>>>>>>>>>>>>>>>>t 9 CP ifdr  $Vpnfit0ol'h0oN>>>>aeexh
/i CP tf2tf2tf2tf2tirgigt'77t>  Po7yo7poSSSa2.IIIadi2Npn ifkle:C4111>>aeexh
/i CP tf2tf2tf2tf2tirgigt'77t>  Po7yo7poSSSa2.)Pn i
CihtdV eCSscs beyhhhhd<tu 7IIIII (oSSSa2.)Pn i
CihtdV e4. c /aHmmmmmmmmmmmmmmmmmmmmmmmmmmaNDiyo7you1PeeDhopt0Luntse4faaimmmmmp
 L' mmmmPn7ll2uT, 'T.f>>>>E Diy