sdart ai software developement tutorial
DESCRIPTION
SDART presented a tutorial about Software Management Engineering in AI-based projects. The tutorial's aim is to familiarise participants with the problems concerning AI-based software project management.TRANSCRIPT
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
The so'ware management and engineering in the AI-‐oriented projects
www.SDART.co.uk
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Plan of presenta:on
§ IntroducEon
§ So4ware project management
§ So4ware design
§ AI implementaEon
§ Examples of AI so4ware
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Introduc:on
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Ar:ficial Intelligence
From the so4ware perspecEve:
§ Ar:ficial intelligence = research = high risk
Therefore dealing with AI in so4ware project we
must be very careful and select the proper
methods, technologies and tools.
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Project success
Success
Budget
Time Quality
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Research oriented so'ware
§ Time and budget aren’t usually fixed – it is
possible to extend the research
§ Resources are flexible
§ People mainly have the personal interests (fame,
dissertaEons, publicaEons …)
§ Quality (funcEonality) is the main concern
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Product oriented so'ware
§ Time and budget are usually fixed
§ Quality is adjusted to the available budget and schedule
§ People mainly have the business interests
§ Resources aren’t flexible
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
AI & so'ware in projects
AI So4ware
AI So4ware
Proper management
Struggle
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
This tutorial Reasons to propose this tutorial:
• There exist the so4ware projects without AI but I’m not
sure if there exist AI projects without the so4ware
(embedded count too!) …
• The knowledge about the so4ware management is
unpopular among AI researchers
• At SDART we deal with the AI-‐oriented so4ware projects
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
This tutorial
• Will: • present a selecEon of the popular techniques and methods for so4ware
development
• evaluate them from AI perspecEve
• propose what could be used
§ Will not: • say what have to be used
• be a guide ready to be applied step-‐by-‐step
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
So'ware project management
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
AI & so' – PM nightmare
§ In the project management two types of projects
are the symbols of unpredictability:
§ Research projects
§ …. so4ware projects
§ What could we do dealing with an AI-‐oriented
so4ware projects? Professionally manage them!
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
So'ware development schema
Planning
Analysis
Design Implementa:on & coding
Deployment & manitenance
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
DM management
§ Data mining management seems to be more
organised than AI
§ There are different models of DM organisaEon:
§ CRISP-‐DM
§ SEMMA
§ DMAIC/DMADV
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
CRISP-‐DM Business understanding
Data understanding
Data preparaEon
Modeling
EvaluaEon
Deployment
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
SEMMA Search
Explore
Modify
Model
Assess
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
DMAIC&DMADV
Define
Measure
Analyse
Improve
Control
Define
Measure
Analyse
Design
Verify
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Management model
§ Can’t we use any DM model to properly manage
the AI&so4ware projects? Yes we could …. only if
the so4ware does not consEtute any significant
part of the project. Meanwhile …
§ AI projects require so4ware to research
§ These projects require so4ware to use AI
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Common risk sources
• Too opEmisEc
• Forgot tasks
• Unavailable • Too low
• Bugs • Increased demands
• Unskilled • Leave team
People Technology
Scope & Schedule Budget
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Risk strategies
§ Avoidance
§ RetenEon
§ Sharing
§ ReducEon
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
So'ware quality There are many so4ware quality factors, among
them: Efficiency
Security
Consistency
Testability Reliability
Maintability
Usability
Quality
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
So'ware quality These factors could be divided into 2 groups
relaEng to:
• users
• developers
So'ware = binaries + code + documenta:on
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
So'ware quality If an applicaEon is a product users perceive only
its „front” parts:
• GUI
• Errors
• DocumentaEon
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
So'ware metrics
§ Tom DeMarco said „You can’t control what you
can’t measure”
§ So4ware metrics measure some properEes of a
so4ware or its specificaEon e.g. complexity,
quality, efficiency or size
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
So'ware es:ma:on
§ EsEmaEon problem
EsEmaEon
Analogy WBS Size-‐based Group Parametric CombinaEon
• Easy
Known • Hard
Known that unknown • Very hard
Unknown that unknow
I think I’ve
forgonen
something, but
what was it???
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Methodology & Life cycle
§ So4ware methodology defines the structure,
plan and management of developed so4ware
§ Methodology contains development philosophy
and tools, methods and models supporEng the
process
§ Life cycle model defines the phases and acEviEes
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
M&LC– staged delivery
Requirements
Design
Implementation
Verification
Maintenance
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
M&LC -‐ spiral
Spiral model – Boehm 1988
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
M&LC – staged delivery Conception
Analysis
Desing
Stage 1
Stage 2
Stage n
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
M&LC – design to schedule Conception
Analysis
Desing
Stage 1
Stage 2
Stage n
Software release
Time? Costs?
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
M&LC -‐ Agile
The Agile development is based on the iteraEve model
Ini:al planning
Planning
Requirements Analysis and design
Implementa:on
Deployment
Tes:ng Evalua:on
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
M&LC -‐ XP
Extreme programming is an Agile implementaEon:
§ Programming in pairs
§ Extensive code review
§ Avoids the programming required in the future
§ Automated tasks
§ Nothing is fixed i.e. everything could be redone
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
M&LC -‐ SCRUM
§ Project is being developed by Pigs & Chickens
§ Pig is commined to the project i.e. ScrumMaster,
Team, ProductOwner
§ Chicken is involved i.e.: Stakeholder, Manager
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
M&LC -‐ SCRUM
The essenEal part of Scrum are the meeEngs: § Daily Scrum – short Eme (approx. 15 minutes), daily report, all people take part § Scrum of scrums – daily meeEng, a4er daily scrum, limited audience § Sprint Planning Mee:ng – begins each sprint cycle
& Retrospec:ve – end each sprint cycle
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
M&LC – Unified Process
§ Is an iteraEve so4ware development framework
IncepEon ElaboraEon ConstrucEon TransiEon
UP ObjecEves
Use Case Driven
IteraEve Architecture centric
Risk focused
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
M&LC – UP versions
§ RaEonal Unifed Process
§ Agile Unified Process
§ Open Unified Process
§ Enterprise Unified Process
RUP Six best
pracEces
Develop iteraEvely
Verify quality
Manage requirements
Model visually
Control changes
Use components
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
M&LC– selec:on The factors that influences life cycle selecEon are:
§ Size of project § Understood requirements
§ Desired reliability
§ Allowed overheads § Progress visibility
§ SophisEcated management
§ Allowed correcEons
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
M&LC -‐ summary
§ Waterfall is sEll the most frequently used model by
the biggest so4ware companies
§ But they do it preparing „yet another version of X”
§ AI projects are usually new for you as well as for
everyone else, so do not expect it to be as easy as
so4ware menEoned above
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Collabora:on
Leader
Member
Member
Member
Member Leader
Member
Member
Member
Member
Homogeneous research team Heterogeneous so4ware team
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Project controlling
Project controlling requires clear definiEon of the
responsibiliEes:
§ Who, what, whom and when
§ Needs reports, working documents,
communicates, standards, plans or charts
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
So'ware design
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Architecture
§ Architecture is a high level planning for the so4ware that does not involve any funcEonal
decisions
Requriements Architecture Design Code
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Views The views are perspecEves that are used to represent different aspect of the system:
§ Code/module view
§ Concurrency/process/thread view § Data view
§ Development/structural view
§ FuncEonal/logic view § Physical/deployment view
§ User acEon/feedback view
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Frameworks So4ware architecture is defined by various frameworks defining its necessary elements:
§ 4+1 § RM-‐ODP
§ DODAF
§ SOMF
§ …
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Frameworks -‐ 4+1
4+1
Process view
Development view
Physical view Scenarios
Logical view
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Design concepts
§ AbstracEon & refinement – generalisaEon
§ Modularity
§ Hierarchy
§ InformaEon & funcEonality enclosure
§ Structural parEEoning – verEcal & horizontal
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
UML
Unified Modeling Language:
§ Object oriented
§ Unified Booch, OOSE, OMT modelling methods
§ Currently in 2.2 version – the most of so4ware
supports 2.0
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
UML Diagrams
UML
Structure
Class Component Composite Structure Package Object Deployment
Behaviour
InteracEon
Sequence CommunicaEon
InteracEon overview Timing
Use Case AcEvity State Machine
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
UML Advantages
UML became an industry standard due to:
§ VisualisaEon
§ DocumenEng
§ Specifying
§ ConstrucEng
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
UML Tools § Papyrus – hnp://www.papyrusuml.org
§ Poseidon for UML -‐ hnp://www.gentleware.com
§ Visual Paradigm for UML -‐ hnp://www.visual-‐
paradigm.com
§ Umbrello UML Modeller – hnp://uml.sourceforge.net
§ StarUML – hnp://staruml.sourceforge.net
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Suppor:ng tools
§ Let’s take a look at the supporEng tools
§ If something could be done simpler and at least
with the same quality
§ Use them and forget the Eme-‐consuming
repeEve tasks and focus on the difficult ones
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Version controlling
§ How to avoid the mess dealing with the different
versions of files in projects?
§ The source code is constantly changing …
§ The AI files too …
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Version controlling Version controlling allows the development team to manage different versions of so4ware. They keep track of work and allow the team to look at the project’s past.
There are 3 kinds of version controlling systems:
§ Local
§ Distributed
§ Client-‐server
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Version controlling – local systems
§ Revision Control System
§ Source Conde Control System
§ MKS Implementer
§ History Explorer PC Rep
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Version controlling -‐ distributed
§ DCVS (Distributed CVS)
§ Monotone
§ GNU arch
§ PlasEc SCM
§ BitKeeper
§ TeamWare
PC Rep
PC Rep
PC Rep
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Version controlling – client/server
§ CVS
§ SVN
§ Codendi
§ ClearCase
§ Visual SourceSafe
§ Autodesk Valut
Client
Client
Client
Server Rep
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Suppor:ng tools & technologies
1 • Compilation
2 • Binaries packaging
3 • Testing
4 • Deployment
5 • Documenting
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Automated builds -‐ advantages § Efficiency increase
§ Development process simplificaEon
§ Increased so4ware quality
§ Reduced costs § False version removal
§ ReducEon of the development team or task relocaEon
§ Project archiving
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Automated builds The automated build tools include:
§ make
§ Maven
§ Ant § MSBuild
§ Cmake
§ and many others
Build
On-‐demand
Scheduled
Triggered
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Automated tes:ng -‐ make An example of makefile taken from QT library. PNGMAK=scripts/makefile.linux all:
cd zlib; ./configure; make cd libpng; make -f $(PNGMAK)
clean:
-cd zlib; make clean -cd libpng; make -f $(PNGMAK) clean
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Automated tes:ng -‐ Ant <project name="MyProject" default="dist" basedir="."> <description>simple example build file</description> <!-- set global properties for this build --> <property name="src" location="src"/> <property name="build" location="build"/> <property name="dist" location="dist"/> <target name="init"> <!-- Create the time stamp --> <tstamp/> <!-- Create the build directory structure used by compile --> <mkdir dir="${build}"/> </target> <target name="compile" depends="init” description="compile the source " > <!-- Compile the java code from ${src} into ${build} --> <javac srcdir="${src}" destdir="${build}"/> </target> <target name="dist" depends="compile” description="generate the distribution" > <!-- Create the distribution directory --> <mkdir dir="${dist}/lib"/> <!-- Put everything in ${build} into the MyProject-${DSTAMP}.jar file --> <jar jarfile="${dist}/lib/MyProject-${DSTAMP}.jar" basedir="${build}"/> </target> <target name="clean” description="clean up" > <!-- Delete the ${build} and ${dist} directory trees --> <delete dir="${build}"/> <delete dir="${dist}"/> </target> </project>
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Automated tes:ng -‐ Maven <project xmlns="http://maven.apache.org/POM/4.0.0" mlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany.app</groupId> <artifactId>my-app</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>Maven Quick Start Archetype</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> </dependencies> </project>
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Automated tes:ng -‐ unit
Test A Test ABCD
vs
Test B Test C Test D
Data
Data Data Data Data
The most popular unit tesEng tool is xUnit available in many versions for all popular languages
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Automated tes:ng -‐ system
Automated GUI tes ts
perceive the applicaEon as
a black-‐box and test it from
the user’s perspecEve.
Scope of tests
Reliability of tests
Speed of testing
Machnie does not
get borred
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Code documen:ng
§ AutomaEc API documentaEon tools:
§ JavaDoc
§ DoxyGen
§ RoboDoc
§ …
Manual documentaEon
AutomaEc documentaEon
Code Doc Code Doc
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Bug tracking Issue/Bug Tracking Systems usage leads to:
§ Bener quality control § Gaining users’ feedback
§ Bener resource allocaEon § Increased users’ comfort
§ Bener informaEon flow
§ Feature request available
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Bug tracking – bug categories
CriEcal
High
Medium
Low
CosmeEc
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Bug tracking
§ Bugzilla
§ Flyspray
§ ManEs
§ Trac
§ Redmine
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Bug tracking
Usage Buga and requests
Deployment Bugs and requests
Testing Bugs
Design and implementation Ideas
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
AI implementa:on
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Implementa:on
§ Transforms the design (plan) into the code
§ Problems:
§ Technology
§ Programming language
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Levels of programming languages
Logical programming
Specialised programming
General (high level) programming
Assembler programming
Machine programming
Levels of p
rogram
ming langua
ges
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
1st genera:on
§ The code lines are equal to the processor instrucEons – one to one
§ Machine code
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
2nd genera:on
§ Symbolic representaEon
of processor’s
instrucEons
§ Assembler language
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
3rd genera:on
§ InstrucEons represent the basic operaEons
§ Oriented on programmer
§ Most popular generaEon
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
4th genera:on
§ Specialised languages oriented on advanced operaEons
§ RAD tools are 4GL build over 3GL
Matlab disp('Hello, world!')
SAS data _null_; put 'Hello, world!'; run;
Postscript (Hello, world!\n) print
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
5th genera:on
§ Represent not algorithms but desired outcome
§ Logical programming
§ Programming for non-‐programmers
Common Lisp (write-line "Hello, world!")
Prolog :- write('Hello, world!'),nl.
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Hybrid programming – embedding
Hybrid programming (embedding languages)
could be synergic but:
§ Increases the technological risk
§ Increases the demand on skilled developers
§ Blurs the project
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Programming paradigms
§ Paradigm is a fundamental style of computer
programming and defines the concept of
programming language
§ The most of programming languages support
various paradigms (different approaches to
problem)
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Programming paradigms
The most popular paradigms are:
§ Agent-‐oriented
§ DeclaraEve
§ Event-‐driven
§ ImperaEve
§ Metaprogramming
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Desktop applica:ons
§ C/C++
§ Java
§ C#
§ Python
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Web services – server side § Java EE
§ PHP § Python
§ Ruby § Perl
§ .NET
§ CGI (every language that could be run by server)
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Web services -‐ RIAs § Flash
§ AJAX § Java SE
§ JavaFX § FLEX
§ OpenLaszlo
§ Silverlight
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Mobile applica:ons
§ Java ME
§ C++
§ ObjecEve-‐C
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Languages popularity Posi:on Apr 2010
Posi:on Apr 2009
Programming Language
Ra:ngs Apr 2010
Delta Apr 2009 Status
1 2 C 18.058% +2.59% A
2 1 Java 18.051% -‐1.29% A
3 3 C++ 9.707% -‐1.03% A 4 4 PHP 9.662% -‐0.23% A
5 5 (Visual) Basic 6.392% -‐2.70% A
6 7 C# 4.435% +0.38% A 7 6 Python 4.205% -‐1.88% A 8 9 Perl 3.553% +0.09% A 9 11 Delphi 2.715% +0.44% A
10 8 JavaScript 2.469% -‐1.21% A
11 42 ObjecEve-‐C 2.288% +2.15% A
12 10 Ruby 2.221% -‐0.35% A 13 14 SAS 0.717% -‐0.07% A 14 12 PL/SQL 0.710% -‐0.38% A 15 -‐ Go 0.710% +0.71% A 16 15 Pascal 0.648% -‐0.07% B 17 17 ABAP 0.625% -‐0.03% B
18 20 MATLAB 0.616% +0.13% B
19 22 AcEonScript 0.545% +0.09% B
20 19 Lua 0.521% +0.03% B hnp://www.Eobe.com/index.php/content/paperinfo/tpci/index.html
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Characteris:cs -‐ domain
§ Specialised – good at something but below
average on other things
§ General purpose – no specific domain and a
compromise on all tasks
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Characteris:cs -‐ speed
§ Compiled faster
§ Interpreted slower
But:
§ Compiled start-‐up slower
§ Interpreted start-‐up faster (write-‐run-‐test cycle)
JIT compilers for interpreted languages
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Characteris:cs -‐ portability
So4ware could be portable on two levels:
§ Source code
§ Binary code
Portability does not relate only to the programming
language but also to used libraries
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Characteris:cs -‐ prototyping
Ability to verify the assumpEon:
§ Dynamic language
§ Simple syntax
§ Efficiency isn’t a main concern
§ Checks if the idea works
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Characteris:cs – target pla`orm
Target plazorm:
§ PC
§ Mobile
§ Web
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Computer languages
(C)Lisp Clips Prolog
Others
Matlab Scilab
C/C++
Java
Python
PHP
Ruby
RIA
…
Scientific perspective Programming perspective
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Why use a specialised languages
§ Popular in the research community
§ Specialized languages
§ Many libraries/toolkits and examples are
available
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Why not use them
§ Specialised not universal
§ High price
§ Simple or no GUI
§ No networking
§ Research not producEon languges
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Important programming features
Dynamic languages:
§ Do not care about types of data
§ Focus on the algorithms
§ But reject a full data control
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Important programming features
Prototyping:
§ Checks algorithms
§ Easily visualise data or make GUI
§ Speed is measured as the Eme of coding not
running
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Important programming features
ScienEfic libraries:
§ How o4en do we construct new algorithms
(Charlie Eppes Syndrome – NUMB3RS)?
§ The applicaEon is more like a large panel building
than brick building – applies to the AI problems as
well as to the „ordinary” so4
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Important programming features
Visual design (graphical programming): § GUI could be constructed using components § Link the components visually § Evaluate applicaEon faster
Core
GUI Core
GUI
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
More important part of AI so'ware
Mechanism
Intelligent
An
Knowledge Models Rules Graphs
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Hybrid so'ware development
Research Development
Idea
Pro
duct
Replanning & redesign
Technology X
Technology X Technology Y ??
??? ??
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Programming libraries – C/C++ § MLC++ hnp://www.sgi.com/tech/mlc/
§ FANN hnp://leenissen.dk/fann/
§ Waffles hnp://waffles.sourceforge.net/
§ OpenCV ML hnp://opencv.willowgarage.com/documentaEon/cpp/ml._machine_learning.html
§ dlib C++ hnp://dlib.net/
§ VFML hnp://www.cs.washington.edu/dm/vfml/
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Programming libraries – Java
§ Java-‐ML hnp://java-‐ml.sourceforge.net/
§ Weka Engine hnp://www.cs.waikato.ac.nz/ml/
weka/
§ MLJ hnp://sourceforge.net/projects/mldev/
§ MALLET hnp://mallet.cs.umass.edu/
§ LIBSVM hnp://www.csie.ntu.edu.tw/~cjlin/libsvm/
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Programming libraries – C# § Infer.NET hnp://research.microso4.com/en-‐us/um/cambridge/projects/infernet/
§ AForge.NET hnp://code.google.com/p/aforge/
§ C# Neural Network Library hnp://franck.fleurey.free.fr/NeuralNetwork/
§ NeuronDotNet hnp://neurondotnet.freehosEa.com/
§ NeuroBox Neural Network Library hnp://www.cdrnet.net/projects/neuro/
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Programming libraries – Python
§ Orange engine hnp://www.ailab.si/orange/
§ PyML hnp://pyml.sourceforge.net/
§ MDP hnp://mdp-‐toolkit.sourceforge.net/
§ PyBrain hnp://www.pybrain.org/
§ LIBSVM hnp://www.csie.ntu.edu.tw/~cjlin/libsvm/
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Programming libraries – PHP
§ FANN PHP Extension hnp://fann.sourceforge.net/fann.html
§ Tremani Neural Network hnp://www.tremani.nl/
open-‐source/neural-‐network/
§ ANN hnp://ann.thwien.de/index.php/Main_Page
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Example I – Java
§ A simple data mining task
§ Uses Java-‐ML library
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Example II – Python
§ AdapEve filtering algorithm
§ Use as a web service (server part)
§ Use mod_python on Apache
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Example III – Flex
§ ParEcle Swarm OpEmisaEon example
§ RIA applicaEon
§ Uses a standard Flex without any addiEonal
libraries
SETN 2010 -‐ TUTORIAL
The so4ware management and engineering in the AI-‐oriented projects
www. .co.uk
Thank you. Any ques:ons?