; Genetic Algorithms(1)
Documents
Resources
Learning Center
Upload
Plans & pricing Sign in
Sign Out

Genetic Algorithms(1)

VIEWS: 19 PAGES: 17

  • pg 1
									                G52GRP Final Individual Report
               «A Java-Based Artificial Intelligence
                  Real-World Problem Solver»

                            Sergei Golubev
                                sxg05u




Group ID: gp06-nxk                                 Other Group Members:
                                               Andreas Antoniades, axa05u
Supervisor:                                     Duncan Bradshaw, deb05u
Dr. Natalio Krasnogor                                 Niall St John, nas05u
                                                    Andrew Young, asy05u




                        The University of Nottingham
                                 May 2007
Contents

   1.      MAFRA ..................................................................................................1
   2.           Personal Contribution to the Project ...............................................1
   2.1.         MAFRA Community group ..............................................................1
   2.2.         Shared FTP server ..........................................................................1
   2.3.         Java 1.1.8 setup under UNIX ..........................................................2
   2.4.         Dependency tree construction ........................................................2
   2.5.         Framework migration to Java 1.5 ....................................................2
   2.6.         Group reports ...................................................................................2
   2.7.         Redundant files filtering ...................................................................2
   2.8.         Meetings...........................................................................................3
   2.9.         Documentation .................................................................................3
   2.10.        Presentation and Open Days ..........................................................3
   3.      GUI Development ..................................................................................3
   3.1.         Requirements...................................................................................3
   3.2.         Design ..............................................................................................4
   3.3.         Implementation ................................................................................7
   4.      Skills and Knowledge Gained .............................................................10
   5.      Problems Encountered So Far ...........................................................11
   5.1.         Poor background knowledge of the “Memetic Algorithms” ..........11
   5.2.         TSG support: Java 1.1.8 on UNIX machines................................ 11
   5.3.         Poor performance of team members ............................................11
   6.      If to Start Over Again...........................................................................11
   7.      Peer Assessment ................................................................................12

   References ...................................................................................................13
   Appendix .......................................................................................................14
1. MAFRA
In September 2006 our group, gp06-nxk, started the work on a “Java-Based
Artificial Intelligence Real-World Problem Solver” project called MAFRA.

MAFRA stands for Memetic Algorithms Framework. It is an object oriented
framework written in Java for general purpose evolutionary computation
applications. Like any other framework, MAFRA is a collection of
interconnected classes. Its purpose is to provide the developer with an
environment for fast design of Memetic Algorithm systems. MAFRA is an open
source project. The main aims of the project were to: migrate framework from
Java 1.1.8 to the latest Java version 1.5 and create a GUI front-end of the
system.

The development is run under the supervision of Dr. Natalio Krasnogor, the
specialist in the field of the memetic algorithms.


2. Personal Contribution to the Project
Below is the list of contributions that has been made by me to the project.

2.1. MAFRA Community group
Setup, adjustment and maintenance of the MAFRA Community group
development journal with the use of LiveJournal.com Internet-service:
My initiative of creating community weblog was very supported and greeted by
the supervisor and all the group members and brought efficiency in the
communication within the group. After setting up the account on the
LiveJournal.com, the members of our group got an opportunity to post all
decisions, arrangements, meetings’ minutes and agendas in the central
location – MAFRA Community Live Journal, which is available by the address
http://community.livejournal.com/mafra_notts.

2.2. Shared FTP server
Organisation of the FTP server for the shared storage space and exchange of
files relevant to the project:
An organisation of the FTP-server (http://www.sgolubev.com/mafra) completed
by me allowed the group to easily exchange the project files before the CVS
system was setup. Moreover, it is very useful in case any of the users is
working remotely from home and haven’t got an access to CSIT servers or CVS
system; therefore, the server allows continuing their work regardless of their
location. The FTP-server stores the source code, JDKs, various manuals and
documentations, graphical files for the GUI, documents with the
agendas/minutes for the group meetings.




                                     1 / 15
2.3. Java 1.1.8 setup under UNIX
JDK 1.1.8 Solaris SPARC version set up on UNIX machines:
As it is the part of our project to upgrade MAFRA from Java 1.1.8 to Java 1.5
versions, and by the project requirements compilation under UNIX is
necessary, the group needed these tools to succeed in developing the
framework.
Problem of setting up JDK 1.1.8, described more detailed in the later section
4.2, delayed the progress of our project. In spite of no support from TSG
technical services group (having sent the proper support request well
beforehand), nevertheless, after an investigation of the problem matter by
myself, having read through various technical manuals and forum topics, I have
successfully coped with the problem raised. With my help our group finally can
use JDK 1.1.8 under UNIX system.

2.4. Dependency tree construction
I have participated in the construction of the preliminary dependency tree and
further discovery of the dependency tree for a specific problem of “Protein
Structure Folding Prediction”

2.5. Framework migration to Java 1.5
Re-factoring of project classes for migration to Java 1.5:
Despite the fact that the work under the framework migration, assigned to other
two members of our team, has not been done, to proceed with the work on my
main assigned task under the development of GUI (to be discussed later) I took
the part of this task on myself. As the GUI implementation included the work
with Protein Folding Problem, there was a need to complete the migration of
the framework into Java 1.5. All the deprecated functions were removed and
updated (including re-writing), following the latest standards of Java
programming language specification. I have progressed in the re-factoring of
the helper classes of data structures (such as Comparable, Hashable,
LinkedList and LinkedListIterator) which were written manually into separate
classes by the previous framework developers in Java 1.1.8.

2.6. Group reports
During the composition of the group report, every member was given its own
part to write. I prepared my own part on the “Results of any initial steps of
implementation” and “Overview of the design of the proposed system, the GUI”.
After, I performed the duties of a maker-up in writing up the group report: I have
taken part in putting together all the document sections (diagrams, charts)
written by our members and setting the document layout.

2.7. Redundant files filtering
As the MAFRA project is the complex framework containing several hundreds
of files, I have the filtered most part of the irrelevant files for the convenience of
the further work so that the time is spent efficiently only working with correct
files.

                                        2 / 15
2.8. Meetings
Actively took part in regular formal and informal meetings. I have
conscientiously fulfilled the duties of Chairperson and Secretary: representing
the group during the meetings with the supervisor as well as preparing meeting
minutes and agendas.
My active participation in the group formal and informal meetings on the regular
basis brought the group many ideas. Sharing the opinions between the group
members and bringing collective resolutions is a really great experience in the
team working.

2.9. Documentation
Additionally to my main task, I have created the program documentation that
includes introduction to the project, program manual and existing
documentation of the classes generated by Javadoc tool. The documentation in
the format of the structured web pages is available under Help → Help Guide
section of the menu bar in the GUI

2.10. Presentation and Open Days
I have taken an active part in planning and preparation for Presentation and
Open Days: carried out the design of the poster (see the appendix), the
handouts, and the presentation slides considering the discourse of the
presentation.


After thorough discussion every member was assigned a specific task to
complete. I was assigned the work on the implementation of GUI front-end.
This was the mutual decision of all the group members, because I have good
designing skills for developing graphical interfaces, gained from being the
experienced web designer and overall strong interest in the field of graphical
design. As this is a complex development process, the work on it is described
in the separate section no 3 below.


3. GUI Development
One of the major goals of the project is to build a GUI front end to the
framework. My role, assigned after group task division, is an implementation of
GUI front-end. It is now my aim to create a user interface that has clearness,
simplicity, functionality and usability applied to all of its “look and feel” features.

3.1. Requirements
The proposed GUI, with MAFRA being a convenient and flexible real-time
problem solving kit, at first, provided users with the Protein Folding and Number
Partitioning problems as samples of the framework capability. Secondly, it is to
allow users to create new algorithms from various modules of MAFRA and by
adding these classes can extend the framework itself.




                                        3 / 15
3.2. Design
As I aim at the user’s satisfaction in the use of the interface, the following key
usability factors were considered important while developing the GUI:

 – Functionality: Graphical user interface provides a good level of functional
   capabilities to suit the user’s needs according to the requirements.
 – Easiness: It is made clear how to learn to use the interface within a quick
   time and getting used to its features. We emphasised on making our GUI
   user-friendly.
 – Layout: Organisation of the information is considered to be easily
   accessed and “absorbed” by the user. For quicker and more logical
   access, task related items are grouped and frequently used elements are
   placed on the screen’s most actively used areas.
 – Response Time (Performance): interface response times are at a good
   level. As this mostly relies on the hardware, compatibility test was run on
   CSIT Labs machines, which in result showed that the GUI’s hardware
   resource requirements are suitable for most standard PC systems by the
   year 2007.
 – Feedback: the user is informed of any problems which might occur by the
   use of an informative message window generated by the GUI, e.g.
   notifying for invalid input data. The status bar changes its message
   according to the state/action of the program, e.g. “Running Protein
   Folding” / “Ready and waiting”.




     Figure 1: Information Dialog Box

 – Maintainability: set of features allow facilitating and secondary type of
   stakeholders to easily maintain the system: update/upgrade it, provide
   technical support. The GUI system is modular and has got well-
   commented code. This allows developers (during our group project – our
   team members) an easy access to the code and ability for its flexible
   modification.


The start screen (see the screenshot below) is created for demonstrational
purposes to introduce the user to the system with a quick overview of the main
functions of the framework. For the user’s convenience there is an option,
stored locally in the configuration file, to skip the start screen, such that the next
time the user launches the program they will be forwarded directly to the main
screen.




                                        4 / 15
                   Figure 2: Start screen of the program

On the example of the main screen of the program running the sample of
Protein Folding (PF) solver, presented on the screenshot below, we can
observe the overall layout structure of the interface.




           Figure 3: Main screen, Protein Folding problem solver

                                  5 / 15
The overall GUI layout consists of a header, central pane and footer:

   The header consists of the drop-down menu which allows the user to
   hide/show the Module Pane, launch help guide and perform global
   operations on the program such as returning to the start screen and exiting,
   a framework logo for decorative purposes and a drop-down list for
   choosing/switching between available solvers.

   Within the central pane, there is a hierarchical tree on the left that lists all
   the modules available to the system as well as a button control to add user’s
   own modules. The main working area with the main controls consists of the
   solver description, text fields with automatic input data validation for entering
   program parameters, process log text area where the program outputs its
   intermediate data and buttons to launch the solver and to preview PF log
   files.

   Finally, the footer has got an informative status bar indicating the current
   state of the program.

Graphical elements such as illustrated icons are of a great advantage in terms
of better visual recognition and overall usability of the GUI. For quicker access
and structuring of data, expanding tree and drop-down type menus are
introduced. Elements from the same area of functionality are logically
decomposed into separate blocks (blocks of input fields, buttons, descriptions)
to increase program’s usability.

I have created the range of logos of different colours, you may observe below.
From my point of view, every project needs to have its logo to give the solution
“personality” and recognisability and to distinguish it from the others.




                          Figure 4: Set of logos for MAFRA

As the framework is able to solve different kinds of problems, the interface
developed has to implement its functionality in different ways. For instance, to
run MultiMemePF2DSquareRel.java for the problem of PF, the GUI has input
fields for passing parameters to the program (refer to the figure 3 above).
Examples of these could be the structure of the lattice, number and sequence
of H/P instances and the direction of movement of instances on this lattice. All
the fields are validated against invalid data input. Thus, the GUI is supposed to
be flexible in implementing the appropriate interface for the solution of every
problem and to be customisable.

                                      6 / 15
                    Figure 5: Protein Folding solver running

3.3. Implementation
A lot of scrupulous work was done on the actual implementation of the MAFRA
GUI from designed graphical sketches to working application. I have strived for
simplicity and readability in the design of our interface. To achieve the best
aesthetic qualities of the interface, an approach of an effective use of
whitespace was used. I aimed to make the best use of our graphical layout: I
keep it clear, simple and intuitive.

Individual research was carried out by me on the latest Java Swing package
features. This included: “drag & drop” option and its application to JTrees,
buttons customisation and window transparency, graphics animation, real-time
interface customisation, and all other different aspects of the GUI design using
Java capabilities.

Implementation of the specified interface design was carried out in close co-
operation with other team members to reduce the number of issues when the
programming capabilities may affect the design solution and to avoid major
changes in the developed interface design, otherwise it would lose its
functionality and initial idea of me as the GUI designer. All the work on the
implementation from the design mock-ups to the working prototype was done
successfully (see the appendix).

To create an attractive look and feel of the interface, I have thoroughly
designed a set of graphics (illustrations, icons, background gradients).A
combination of the icons for the customised buttons was also designed in their
several possible states: initial, hover, pressed.

                                     7 / 15
                    Figure 6: Graphical elements design

All the sketches of program screens and graphical elements were manually
drawn with the use of Xara Xtreme professional vector-based graphics
software:




                Figure 7: Graphical workshop in Xara Xtreme

Technical implementation of the GUI was carried out with development under
the Swing GUI toolkit for Java and JCreator as an IDE. An existing solution
given to the team consisted of purely draft versions of semi-graphical output
screens and was developed in 1999 with Java AWT, many parts of which were


                                   8 / 15
deprecated in Java 1.5 and show poor performance. Swing GUI components
are more sophisticated, which allows creating solutions for far better user
experience. Framework classes which required output to a graphical system
were rewritten from AWT to Swing according to the latest specification of Java.
All the deprecated objects and methods were replaced by either similar or
newly introduced components.

Considering GUI layout organisation, several layout managers such as
BorderLayout, BoxLayout, FlowLayout and GridLayout were used jointly by
forming nested layout structures.

Swing’s new JFormattedTextField component allows data validation upon input
into text fields, such that having entered text into a field requiring integer, a
notification popped up and until the user enters correct data the process will not
run. As for entering H/P instances for PF problem, for the user’s convenience
they are limited to entering “H” and “P” letters on the keyboard only.

Graphical components were set up and arranged within JFrames and JPanels
in a way to enable elastic layout, when certain major elements does not have
fixed size. This enhances usability and accessibility without cramping
aesthetics on the systems with different screen resolutions, ensuring that GUI
always looks well. JScrollPanes were used where appropriate. A JTree on the
left hand side of the main screen is aggregating and showing the actual data
about available modules by traversal of the directory where appropriate classes
are stored.

Due to the problem 5.4, described in the section below, “New Project” section
of the GUI was not completed. As a part of the functionality of this section, the
feature for adding modules was added. This allows users to add their own
modules to the system into the appropriate category. The source file is
automatically compiled and added to the tree of the modules. If compilation
error occurs, the file is declined and the notification is given.




                     Figure 8: Adding a module dialog box

Additional feature developed is, in order to store user settings about the project
they created, all the parameters of the selected modules is saved into an XML
file. I have written XML data extractor using SAX XML parser, which allows the
user data to be loaded to the program.

                                      9 / 15
Several performance and functional issues were successfully resolved while
developing the GUI:

– PF problem solving processes are resource-intensive. When running them
  the screen is repainted very often and screen flickering occurs. This artefact
  was reduced with enabling double buffering feature. Anti-aliasing was also
  applied to the screen.
– Concurrency problems which caused the running of PF to be unstable were
  fixed by encapsulating the process into a separate thread and making
  several   methods     involved    into   the    process     synchronized.
  MultiMemePF2DSquareRel.java file was rewritten to allow to be run not only
  with command line arguments as an external application, but with internal
  program arguments within the program framework.
– As the console window for standard output is not available when running the
  GUI, the log which was previously streamed to standard output is now
  redirected to the "Process Log" text area on the main screen of the program.
– The preview of generated log files for the PF problem now can be done from
  within the program by pressing the corresponding button and an external text
  viewer will be invoked according to the type of operating system used (e.g.
  Windows/UNIX); this ensures program compatibility on different platforms.
  For example, under Windows the text viewer associated with the .log
  extension is launched; under UNIX Emacs is launched.


4. Skills and Knowledge Gained
Overall the project brought a lot of useful experience and helped me to improve
my skills in many areas, including both computer and in sociological areas. As
well as I gained numerous transferable skills that could be applied in the future,
thanks to the project.

– Work in group: participation in meetings and discussions held by the group,
  effective collaboration between team developers, sharing ideas, bringing
  group decisions
– Working on a large-scale project independently
– Principles of Object-Oriented programming (OOP) with the application of
  Java programming language
– Individual research: comprehensive examination of genetic (evolutionary)
  and memetic algorithms, MAFRA project framework
– Work under time pressure: on-time progress, keeping to deadlines
– Familiarising with a state-of-the-art Java based artificial intelligence real-
  world problem solver software framework.

– Transferable skills: work in a team, report writing, programming (Java, Java
  AWT and Swing), graphical design, advanced operation in UNIX system,
  CVS system management, system planning and structure design (UML)




                                      10 / 15
5. Problems Encountered So Far

5.1. Poor background knowledge of the “Memetic Algorithms”
Complexity of the project topic in “Memetic Algorithms”, coming from non-
computer science field, required immediate understanding of the principles of
evolutionary, genetic and memetic algorithms to be in the course of all the
events for the further work. Systematic research on the topic using library
facilities and Internet resources 1 recommended by the supervisor helped me to
get the basics of the subject matter.

5.2. TSG support: Java 1.1.8 on UNIX machines
Since the very beginning of the project there was an issue of setting up the JDK
version 1.1.8 (dated 1999) required for the work on CSIT UNIX-machines.
There were problems with the correct installation and adjustment of the
backdated JDK cased by the incompatibility with the present versions of JDK
installed in the systems. Having sent the support request to TSG (Technical
Services Group) group in order to get the assistance, unfortunately, our group
was given no reply. As it was previously mentioned this problem was
successfully solved by me.

5.3. Poor performance of team members
Unfortunately, the performance of other team members left a lot to be desired.
Like the whole progress of the project depended on the work of each member,
the development of GUI required the completion of the framework classes re-
factoring and Number Partitioning problem solver. These main tasks were
assigned to the pairs of the team members Andreas Antoniades, Andrew
Young and Duncan Bradshaw, Niall St John correspondingly, who didn’t
manage to put an effort to complete their work. Therefore, the GUI
development could not proceed further, and moreover I had to complete some
of these parts by myself in order to give the project the desired progress.


6. If to Start Over Again
If I was to start the work on the project over again I would, if possible, seek for
more help from our supervisor in terms of the organization of work of the other
team members to make their motivation for the project higher, which would
reflect in overall work productivity. In general, I would not change the way of
how my part of work under the development of GUI was done, as I am sure I
did all my best and brought a big contribution to the project.




1
    http://www.cems.uwe.ac.uk:80/~jsmith/ecbook/ecbook-course.html – one of the resources

                                           11 / 15
7. Peer Assessment
Andreas Antoniades, axa05u
Being the team leader Andreas showed good leadership qualities. Has given a
good start and a motivation for the project. Regular attendance of the meetings.
Carried out the roles of a Chairman/Secretary very well. Showed his interest
and put an effort of in the progress of the project, however at the end lost the
motivation due to the Number Partitioning task resolution difficulties.

Mark: 60%

Andrew Young, asy05u
Regular attendance of the meetings. Showed good performance. Carried out
the roles of a Chairman/Secretary, prepared reports very well. Working in pair
with Andreas Antoniades, due to the Number Partitioning task resolution
difficulties lost the motivation for the project.

Mark: 55%

Niall St John, nas05u
Poor performance in the course of the entire project. Despite the fact that he
attended the majority of the meetings, during them he was present for a short
period of time and no effort was put into the project. The assigned task on the
re-factoring of classes was not completed, mostly without trying to do it,
regardless of a feasibility of the process. Did not completely accomplish the
administrative duties of Chairman/Secretary.

Mark: 40%

Duncan Bradshaw, deb05u
Showed poor performance in the course of the entire project. Very low
attendance of both formal and informal meetings. Working along with Niall St
John All the time was given a low-difficulty task, which was incompetently
completed. Did not accomplish the administrative duties of Chairman/Secretary.

Mark: 40%



All the members often made complaints against the feasibility of the project.




                                     12 / 15
References
– “MAFRA: A Java Memetic Algorithmic Framework”, Natalio Krasnogor, Jim
  Smith. http://www.cs.nott.ac.uk/~nxk/MAFRA/MAFRA.html
– Introduction to Evolutionary Computing, A.E. Eiben and J.E. Smith
  http://www.cems.uwe.ac.uk:80/~jsmith/ecbook/ecbook-course.html




                                   13 / 15
Appendix




           Figure 9: Poster for the Open Day




                        14 / 15
Was:




Became:




       Figure 10: GUI “evolution”, from the mock up to the prototype

                                  15 / 15

								
To top
;