AND TECHNOLOGY
SOFT COMPUTING PRACTICAL FILE (CS-801)
Subject Guide: Submitted by:
INDEX S.No. | List of Experiments | Signature | 1. | Implement Perceptron network with binary input and output. | | 2. | Using Madaline net, generate XOR function with bipolar inputs and targets. | | 3. | Calculation of new weights for a back propagation network, given the values of input pattern, output pattern, target output, learning rate and activation function. | | 4. | Use of ART algorithm to cluster vectors. | | 5. | Implement traveling salesman problem using genetic algorithm. | | 6. | Implement various laws associated with fuzzy sets. | | 7. | Implement fuzzy sets. | | 8. | Implement word matching using GA. | |
Experiment 1: Implement Perceptron network with binary input and output.
Program:
/*PERCEPTRON*/
#include<stdio.h>
#include<conio.h> main() { signed int x[4][2],tar[4]; float w[2],wc[2],out=0; int i,j,k=0,h=0; float s=0,b=0,bc=0,alpha=0; float theta; clrscr(); printf("Enter the value of theta & alpha"); scanf("%f%f",&theta,&alpha); for(i=0;i<=3;i++) { printf("Enter the value of %d Inputrow & Target",i); for(j=0;j<=1;j++) { scanf("%d",&x[i][j]);} scanf("%d",&tar[i]); w[i]=0; wc[i]=0;} printf("\Net \t Target\tWeight changes\tNew weights\t Bias changes\tBias \n"); printf("-----------------------------------------------------------------------------\n"); mew: printf("ITERATION %d\n",h);