Results 1 to 14 of 14

Thread: VB.Net - evolutionary computing framework - ideas people wanted

  1. #1

    Thread Starter
    Frenzied Member MerrionComputin's Avatar
    Join Date
    Apr 2001
    Location
    Dublin, Ireland
    Posts
    1,616

    VB.Net - evolutionary computing framework - ideas people wanted

    Hi,

    I am looking at knocking up a framework for use in evolutionary computing type programs - just interface specifications at this moment. Any bright people interested in developing and/or discussing this?

    Thanks in advance,
    Duncan
    ----8<---------------------------------------
    NEW - The .NET printer queue monitor component
    ----8<---------------------------------------
    Now with Examples of use

  2. #2
    Fanatic Member
    Join Date
    Jul 2002
    Location
    Australia
    Posts
    635
    Ican do interface framrworks in VB6-since it'll run on 9.x too-for ev, unlike net wihichis drev.-nt based only,.
    A.A. Fussy
    Babya Software Group

  3. #3
    Addicted Member Nigh™a®e's Avatar
    Join Date
    Feb 2002
    Location
    Belgium
    Posts
    175
    hmmm

    Are you working on the same as i am?
    http://www.vbforums.com/showthread.p...hreadid=240711

    Let me know, if not, im intrested to help you.

  4. #4

    Thread Starter
    Frenzied Member MerrionComputin's Avatar
    Join Date
    Apr 2001
    Location
    Dublin, Ireland
    Posts
    1,616
    Not very similar as far as I can see.

    An evolutionary computing framework is one that facilitates the principles of evolution for solving problems. The main players are:
    IEnvironment - The interface that defines the environment of the problem. The environment is responsible for defining the viability of individuals.

    IPopulation is a type safe collection class with additional methods for querying the population as a whole (such as the average viability and viability spread etc.) and affecting it (culling).

    IIndividual is a single individual that represents a possible solution in the problem. An individual has a set of genes that define it's solution to the problem space and individuals may breed which will result in offspring with genes selected at random from each parent.

    IGene represents a parameter that affects a part of the solution.

    For example, suppose we have a chess board with a game in play and want to select the best next move. Our class that inherits IEnvironment needs to supply a method that returns the viability of an individual - i.e. how sensible a move is.
    Genes are created that specify which piece to move and which of it's possible end positions to chose. The population is seeded with a random set of individuals with a random mix of these genes.
    The population is allowed to breed and then the bottom half are culled. This process is repeated a number of times until the population has a zero (or prechosen very low) viability spread. An individual in this population fits our best move.

    The power of this framework is that it can be mapped to a huge range of problems by setting the environment and genes and the same underlying processes can be used to solve these problems.

    Anyway - that is where I have got to. Any thoughts?
    ----8<---------------------------------------
    NEW - The .NET printer queue monitor component
    ----8<---------------------------------------
    Now with Examples of use

  5. #5
    Addicted Member Nigh™a®e's Avatar
    Join Date
    Feb 2002
    Location
    Belgium
    Posts
    175
    So, if i understand u right, its a kind of ai framework?

    Anyway it sounds intresting, so i'm intrested, sure if it for a kind of ai.

    I don't have much time to work on different project, cause i have many projects running myself.

  6. #6
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Originally posted by aafuss
    Ican do interface framrworks in VB6-since it'll run on 9.x too-for ev, unlike net wihichis drev.-nt based only,.
    Just to clear up this, .Net apps can run on Win 98 and up. It isn't just NT based. So the only Win OS it doesn't support is Win 95 (it is now over 8 years old, isn't that decades in computing?).

  7. #7

    Thread Starter
    Frenzied Member MerrionComputin's Avatar
    Join Date
    Apr 2001
    Location
    Dublin, Ireland
    Posts
    1,616
    (it is now over 8 years old, isn't that decades in computing?).
    I hope not or that would make me even more ancient

    I don't think the lack of support for Win95 would be a major worry as this is the kind of thing that is mainly of interest to .Net developers and they aren't running old OSes anyway...
    ----8<---------------------------------------
    NEW - The .NET printer queue monitor component
    ----8<---------------------------------------
    Now with Examples of use

  8. #8
    Fanatic Member
    Join Date
    Jul 2002
    Location
    Australia
    Posts
    635
    Wring-with .net you can't do development on 9.x machines-as the VAS.net won't run on 9.x-but its pirtable say to irther oses.
    A.A. Fussy
    Babya Software Group

  9. #9

    Thread Starter
    Frenzied Member MerrionComputin's Avatar
    Join Date
    Apr 2001
    Location
    Dublin, Ireland
    Posts
    1,616

    * Recomended reading *

    If this topic sounds of interest but you don't know muchg about it, check out the EvoWeb resource.

    Also recommend the book The Blind Watchmaker..
    ----8<---------------------------------------
    NEW - The .NET printer queue monitor component
    ----8<---------------------------------------
    Now with Examples of use

  10. #10
    Addicted Member
    Join Date
    Mar 2003
    Location
    Minneapolis, MN
    Posts
    151
    Just my couple of pennies worth (thoughts that may have no credibility).

    IRule represents a guideline in which an action can take place.

    IRating represents the worth of a completed action.

    I suppose that either or both of these could be infact implementations of IGene...

    Applied to your chess example, instances of IRule would tell the instances of IGene what the valid moves are and instances of IRating would determine which of the possible moves best satisfies the "Cause and Effect" of making each move.

  11. #11
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148
    Applied to your chess example, instances of IRule would tell the instances of IGene what the valid moves are
    I think that the environment would terminate any gene stes that resulted in an invalid move and then the healthiest individual from the remaining population would be the best move..

    This allows the framework to deal with situations where we don't know the rules for certain, but just know how to tell a good answer from a bad one. e.g. speech recognition, decryption etc.

  12. #12
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148
    A bit of code....

    VB Code:
    1. '\\ --[IEnvironment]-----------------------------------------------------------
    2. '\\ Defines the problem space for the genetic algorithm(s) to solve
    3. '\\ (c) 2003 Merrion Computing Ltd
    4. '\\ --------------------------------------------------------------------------------
    5. Public MustInherit Class IEnvironment
    6.  
    7. Public MustOverride Function GetPopulation() As IPopulation
    8.  
    9. Public MustOverride Property MinimumValue(ByVal GeneType As IGene) As Integer
    10.  
    11. Public MustOverride Property MaximumValue(ByVal GeneType As IGene) As Integer
    12.  
    13. End Class
    14.  
    15. '\\ --[IGenome]----------------------------------------------------------------------------
    16. '\\ The genome defines the number of genes a member of a population has and their explicit
    17. '\\ locations. These locations have an explicit meaning in relation to the problem being
    18. '\\ tested by the environment and are not interchangeable
    19. '\\ ----------------------------------------------------------------------------------------
    20. Public MustInherit Class IGenome
    21. Inherits System.Collections.DictionaryBase
    22.  
    23. End Class
    24.  
    25.  
    26. '\\ --[Individuals]-------------------------------------------------------------------------
    27. '\\ A collection of IGenome based objects
    28. '\\ ----------------------------------------------------------------------------------------
    29. Public Class Individuals
    30. Inherits System.Collections.CollectionBase
    31.  
    32. End Class
    33.  
    34.  
    35. '\\ --[IPopulation]------------------------------------------------------------------------
    36. '\\ The population represents a set of potential solutions to the problem. It can be
    37. '\\ created from a randomly generated, or seeded by a predefined set, of individuals.
    38. '\\ ----------------------------------------------------------------------------------------
    39. Public MustInherit Class IPopulation
    40. Inherits System.Collections.CollectionBase
    41.  
    42. Public MustOverride Function Breed(ByVal Parents As Individuals) As IGenome
    43.  
    44.  
    45. Public Sub New()
    46.  
    47. End Sub
    48.  
    49. Public Sub New(ByVal Seedgroup As Individuals)
    50.  
    51. End Sub
    52.  
    53. End Class
    54. '\\ --[IGene]-------------------------------------------------------------------------------
    55. '\\ The gene holds the current value for an individual variable that is used to compute the
    56. '\\ gene set's fitness to solve the environment's problem
    57. '\\ ----------------------------------------------------------------------------------------
    58. Public MustInherit Class IGene
    59.  
    60. Public MustOverride Property Name() As String
    61.  
    62. Public MustOverride Property Value() As Integer
    63.  
    64. End Class

    I think there is a case for an intermediary to differentiate between a gene definition and a gene instance.

  13. #13
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148
    It's been a long time but I finally have a "hello world" level demonstartion of this.
    It is a "Mastermind" game that the program tries to evolve the solution to. You can adjust the number of pegs and population size to see how that affects the number of steps needed to find a solution.

  14. #14
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148
    *Attached*

    Any thoughts?
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width