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
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
Ican do interface framrworks in VB6-since it'll run on 9.x too-for ev, unlike net wihichis drev.-nt based only,.
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.
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?
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.
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?).Quote:
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,.
I hope not or that would make me even more ancient :eek:Quote:
(it is now over 8 years old, isn't that decades in computing?).
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...
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.
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..
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.
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..Quote:
Applied to your chess example, instances of IRule would tell the instances of IGene what the valid moves are
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.
A bit of code....
VB Code:
'\\ --[IEnvironment]----------------------------------------------------------- '\\ Defines the problem space for the genetic algorithm(s) to solve '\\ (c) 2003 Merrion Computing Ltd '\\ -------------------------------------------------------------------------------- Public MustInherit Class IEnvironment Public MustOverride Function GetPopulation() As IPopulation Public MustOverride Property MinimumValue(ByVal GeneType As IGene) As Integer Public MustOverride Property MaximumValue(ByVal GeneType As IGene) As Integer End Class '\\ --[IGenome]---------------------------------------------------------------------------- '\\ The genome defines the number of genes a member of a population has and their explicit '\\ locations. These locations have an explicit meaning in relation to the problem being '\\ tested by the environment and are not interchangeable '\\ ---------------------------------------------------------------------------------------- Public MustInherit Class IGenome Inherits System.Collections.DictionaryBase End Class '\\ --[Individuals]------------------------------------------------------------------------- '\\ A collection of IGenome based objects '\\ ---------------------------------------------------------------------------------------- Public Class Individuals Inherits System.Collections.CollectionBase End Class '\\ --[IPopulation]------------------------------------------------------------------------ '\\ The population represents a set of potential solutions to the problem. It can be '\\ created from a randomly generated, or seeded by a predefined set, of individuals. '\\ ---------------------------------------------------------------------------------------- Public MustInherit Class IPopulation Inherits System.Collections.CollectionBase Public MustOverride Function Breed(ByVal Parents As Individuals) As IGenome Public Sub New() End Sub Public Sub New(ByVal Seedgroup As Individuals) End Sub End Class '\\ --[IGene]------------------------------------------------------------------------------- '\\ The gene holds the current value for an individual variable that is used to compute the '\\ gene set's fitness to solve the environment's problem '\\ ---------------------------------------------------------------------------------------- Public MustInherit Class IGene Public MustOverride Property Name() As String Public MustOverride Property Value() As Integer End Class
I think there is a case for an intermediary to differentiate between a gene definition and a gene instance.
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.
*Attached*
Any thoughts?