Software simulation of hardware evolution

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

Reply to
apsolar
Loading thread data ...

Expressing gates AND OR NOT is the easy part. You need to decide whether you want the interconnect to be defined such that an arbitrary sequence results in a single function of inputs or if it can express multiple disjoint functions. For the second case what if you add a fourth "gate" type of BUF or unary pass- through. Then in a sequence where you have unary NOT and BUF and two-input AND and OR, each instance of NOT or BUF indicates an input to the function. Each AND or OR would take its inputs from the two nearest preceding function outputs. If more than two instances occur without AND or OR, there would be a "break" and a new function would start. For example:

NOT BUF AND NOT NOT OR BUF AND

would encode in1 & !in2 .break. (!in3 | !in4) & in5

however adding another AND or OR at the end of this sequence would then combine the two functions:

NOT BUF AND NOT NOT OR BUF AND AND

would encode (in1 & !in2) & ((!in3 | !in4) & in5)

This seems simple enough, except that as your sequence grows you build functions of more and more inputs, and you need a way to encode re-use of existing inputs (e.g. mapping in4 of the above equation to in2). Perhaps someone can come up with an interesting way to do this...

Regards, Gabor

Reply to
Gabor

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.