# Software simulation of hardware evolution

Discussion in 'VHDL' started by apsolar@rediffmail.com, Aug 24, 2005.

1. ### Guest

Hi Guys
I was able to implement Genetic algorithms on software.
Now I am taking my project to the next level by simulating hardware
like logic gates (AND,OR,NOT) as classes in software.
Then I can create objects of these classes and evolve a circuit with
the help of these gates. Maybe evolve a NAND gate. I think it is
feasible but I would like your suggestions on this idea.
Your suggestions did help me completing the previous software to solve
an equation genetically.
I was just wondering how should I represent a circuit in the form of a
chromosome('010011010' or 'A!B&|C').Mutation is the next process and
what could possibly be a fitness function.

Ankit Parikh
Manukau Institute of Technology

, Aug 24, 2005

2. ### EricGuest

The chromosome could be a linear truth table:

example: NAND
A B | C
0 0 | 1
0 1 | 1
1 0 | 1
1 1 | 0

Representation "001"&"011"&"101"&"110" = "001011101110"

The fitness function could evaluate each peice of the truth table
(every possible A B combination and assign a value to each right or
wrong answer. So for a NAND gate you'd have 4 peices of the fitness
function, just add them together to get the fitness value for that
population.

It's a strech, but it might work.

Good Luck,

Eric

Eric, Aug 24, 2005

3. ### EricGuest

I'm making the chromosome more complicated than it needs to be. Just
have it be the four values of C

Example for NAND = "1110". This will make crossovers and mutations a
lot easier.

ERic

Eric, Aug 25, 2005