Showing posts with label Artificial Intelligent (AI). Show all posts
Showing posts with label Artificial Intelligent (AI). Show all posts

Saturday, November 15, 2008

Genetic Algorithm (GA) In Solving Multi Variants Problem Implemented In Ms. NET C# (Multivariate Genetic Algorithm Solution)

Year: 2008
Programming Language & Tools: Microsoft .NET C#
Source code / Request for customization: http://www.geneticalgorithm.biz/
Application For Test: Download

Optimization Using Genetic Algorithm In C#
This is a Multivariate Analysis and Solver using Genetic Algorithm methodology. Simulation application implemented in Ms. Net C#.

Assume we have certain number of farm lands (in area). Each land contain 2 types of insect. Assume we have certain number of fertilizer to be chosen to use where each of them having different cost (per area) and killing effectiveness (in %) for each type of insects.

By using Genetic Algorithm and Dynamic Programing technique, we want to find out, which fertilizer used for each land that satisfied minimum insects of number and also minimum cost of fertilizer.

Imagine if you have 50 farms and 30 types of fertilizer to choose. In order for you to obtain a promising solution by examining all possible combination, it will take years in the computational power we having now.

Using GA in solving multi-variant problem like this need a suitable data structure to represent the problem space. Representation of chromosome and DNA (element in each chromosome) need to be designed in a way to combine different farm lands with fertilizer. By randomly pair the farm land with the fertilizer, checking the fitness value in each chromosome, performing GA operation process to obtain a best fitness value chromosome. Then, the solution set can be obtain by retrieving the information in DNA from the chromosome.

You can go to: GA Project Coding Service for requesting the methodology document in details.

For understand another example of GA in solving shortest path problem, refer to:
Genetic Algorithm (GA) In Solving Vehicle Routing Problem

or access Genetic Algorithm (GA) In Solving Vehicle Routing Software Package

Genetic Algorithm process:
1. Perform a number of loops according to the generation.
2. For each loop:
a. Depend on the chance, perform Cross-Over operation.
b. Depend on the chance, Perform Overlapping operation.
c. Depend on the chance, perform Mutation operation.
d. Perform sort operation on the chromosome list.


Tuesday, April 17, 2007

ADALINE TDL Neural Network Simulation In CSharp (C#)

Year: 16 Apr 2007
Programming Language: Microsoft .NET C#
Source code / Request for customization / Request a new custom made simulation, you can email to author : ahyeek@gmail.com
Simulation Application For Test: Download
As we know, neural network is a mathematic model that can be trained in order to "learn" certain information and able to perform some so called "intelligent" decision such as recognizing certain data pattern or understand certain object in a picture.

This Tapped Delay Line (TDL) neural network is using the previous value on a graph to train it and used to predict a furture value. Given points from a graph as (x1, y1), (x2, y2), .... , (x(n-1), y(n-1)), TDL Nnet with (n-1) delay step is able to predict (x(n), y(n)) by giving it the (n-1)previous values. For each iteration, the Neural Net will get trained again and again in real time by suplying the actual value to the Neural Net. Hence, we consider TDL is a real time neural network because the training mechanism can be done in real time.
When you try to run the simulation application, try to observe that the average error values will decrease when the iteration increase. You can try to use differerent data set and observe how the ADALINE TDL neural net perform its prediction. The weight values of the neural net will become stable while the error of prediction value is low. Observing that the predicted value (graph blue in color) is not overlap with the actual value (graph in yellow color) at the beginining. However, it will slowly overlap each and other after some iteration. This is because the neural net has been trained and recongnize the pattern of the given graph.

Please refer to the demonstration for further information. This demonstration has been implemented in Java 4 years back: ADALINE with TDL Neural Network model. But now, the author implement it again in 2 weeks time with some enhancement (using moving graph component - CSharp (C#) Control Component - Moving Graph Control) in C#.

You will observe the predicted values from the simulation will become more and more accurate after some iteration. The average error value will reduce while the iteration increase. The neural network will become more and more 'intelligent' in predicting the next value of the graph after it has been thought for some time. You can choose different graph set to test out the Nnet using the simulator. By noting down the result, you actually can compare what properties values of the neural net are the best setting for obtaining fastest and lowest error value. The "Delay Step" and "Learning Rate" are the properties that determine how fast the neural network are able to be trained and how accurate the predicted value.


Saturday, March 11, 2006

Genetic Algorithm (GA) In Solving Vehicle Routing Problem

Year: 2005 - 2006
Programming Language & Tools: Microsoft .NET C#Source code / Request for customization: http://www.geneticalgorithm.biz/
Application For Test: Download


This simulation was developed to learn Genetic Algorithm and coded in Ms. Net C#. The problem that the author faced was to solve the vehicle routing. In order to implement and visualize how GA perform in solving the problem, the simulator was impemented with a random generated map. Users can actually provide the number of locations he/she wants and how many roads connect to each location, then the map generator will generate a map with the corresponding setting.
Several parameters need to be provided before performing the GA to solve the problem. The parameters are basically the GA needed parameters, such as Population size, Cross-Over Rate, Mutation Rate and Number of Generation. User need to determine the source and destination on the map before simulate the solutions. The system finally will give a path that connect the source and destination location as well as the distant and time using the path. The goal is to get the shortest and fastest route for travel from source to destination.
Furthermore, the simulator actually build in another algorithm - Dijikstra Algorithm. This algoritm is the best and fastest algo in solving shortest path problem. It's actually used to compare wtih GA in solving a specified situation. Simulator also build in with all potential path generation mechanism, but it depend on maps and the source and destnation location that user choose. Sometimes, it will take long time to get all the posible paths generated. However, this mechanism is actually implemented in a thread manner that user actually can generate the potential path and let the simulation run synchronizely.
There are a lots of other useful an interesting features implemented in the simulator and the author think it will be too much to state here. So, let download the system and try it! You will discover more....

Wednesday, March 01, 2006

AI 8-puzzle (8 Puzzle) solver

Year: 2002
Programming Language: MS. Visual C++ Ver 6.0
Source Code : Core code shared here
Application For Test: Download
Full Working Application Project Source Code / 8-Puzzle solver implemented in C#, you can email :ahyeek@gmail.com

System allow user to input 8-puzzle question and solve it using various AI methods. The AI methods that are chosen are basically commonly used to solve the puzzle problem. Fundamental of AI solutions is actually let the computer generate the solutions space and search it using some heuristic mechanism. AI Algorithm which can minimize the solutions space and has the fastest search mechanism will eventually become the best method.
The methods explored and implemented are: Blind Breath-First Search, h=Sum(step tiles from origin), h=Num. of Title not in place, Manhattan Distance Heuristic and A* Searching Algo (A Star Algorithm). Blind search is actually the worse algoritm in this scenario while the A* algorithm is the best. You may test it using this system by observing the time unit that the computer use, the exposed solutions and the solution steps obtained by different algo.



Dynamic Bandwidth Allocation implementing Neural-Fuzzy (Neural Network + Fuzzy Logic) Technique simulated in JAVA Network Simulator

Year: 2001
Programming Language: Java
Source Code: Email the author: ahyeek@gmail.com
Application For Test: ahyeek@gmail.com
Related Documents: Download


This system was built in order to fulfill my final year research project at University Of Malaya.
General Concepts:
A Neural-Fuzzy model was created in order to predict the next incoming bandwidth in ATM network which contain of several parties and intelligent allocate a suitable bandwidth according to each party usage pattern. The objective is to reduce the drop rate in switch buffer and maximize the usage of the outgoing bandwidth.
Neural network play the role in predicting the next incoming pattern from different parties. The fuzzy logic plays the role in evaluating the pre-set user rules and assigned intelligently the suitable bandwidth.

You may download and refer to the report for further details of this project.

Simulation ADALINE with TDL Neural Network model

Year: 2001
Programming Language: Java
Source Code: Email the author: ahyeek@gmail.com
Application For Test: Refer to ADALINE TDL Neural Network Simulation In CSharp (C#)
This simulation is built to test the Neural Network model in predicting complex non-linear system. Amazingly, it works!

Concept:


  1. Initial a x value. (t=0). By inputting the x value into the NN model to produce the predicted y value.
  2. The author actually generate a 2D (x,y) coordinate using a complex equations (joining some 2sin(x) + 3cos(x), ….).
  3. Obviously the y value will give a wrong value because the NN model have not been trained.
So, the system is going to teach the NN model using the actual y value generated in step 2 and repeat step 1 again for the x value in next time step (t=1).

By performing this teaching mechanism to the neural network, you will observe that when simulation run longer (t>20k), the NN model actually can have a quite good prediction of y value by the given x values.

No difficult steps need to perform in order to set up and run this simulation. Please have a try. You will notice that the more iteration of the simulation runs, the error rate reduced.


Printer Troubleshoot Expert System

Year: 2000
Programming Language: Java
Source Code: Email the author: ahyeek@gmail.com
Application For Test: Download
Related Documents: Download
Expert – a person who is very knowledgeable about or skilful in a particular area. Time is needed for a person to become an expert in a particular domain. If an expert does not pass his or her expertise to others, the knowledge might lose forever. When people talk about expert, the first thing that comes in mind is some bombastic profession such as doctor, scientist and maybe engineer. Even most of these professional can be consider as expert in their field, there do have other expert. As an example, a cook who can prepare very good curry can be considered as an expert in making curry. An expert system will try to encode the expertise into its own knowledgebase. With this knowledge, an expert system is capable to perform as an expert in a particular domain.


In this project, an expert system in printer troubleshooting will be built. This expert system is capable in diagnose a printer problem and providing a solution base on the found problem. Another advance feature of this expert system is that it is capable of processing natural language. A user needs only to input the problem description in natural language and the expert system will try to understand the problem and derive a solution for it.

To obtain the needed information for building the expert system, we will try to gain the needed data by conducting an interview with an expert in printer troubleshooting. Beside that, we will try to acquire the information for the Internet and other source such as computer magazine. In this project, Java will be used to develop the whole expert system. This includes the knowledge representation for the expertise and inference engine of the expert system.

Simple Family Relation System

Year: 2000
Programming Language: Visual Prolog 5.1
Source Code: Email the author: ahyeek@gmail.com
Application For Test: Download
Related Documents: Download
Another assignment proposed during University Malaya, the AI course. In this course, students are requested to produce a family relationship application using Visual Prolog 5.1. Within a month, the author study the VP and trying to create that. It’s actually a very interesting programming language and total AI-based. Using various techniques of AI methods and concepts, the system is built with various functionalities, such as the system is able to tell the user the relationship between any members that has been chosen.

Furthermore, by right click on any member, the system will tell the information of the chosen family member, such as how many children he/she has, even how many daughter or son. If the user chooses to display a family member where he is actually a grandfather, then the system is able to show how many grandchildren do him own and how many son or daughter he has as well.

Sound interesting? Let try it out. You will be surprising that Prolog actually can produce quite a good window application.

Image Understanding (IU)

Throughout these years, the growth of digital media collections has been accelerating, particularly in still images. These artifacts repre...