Sdart AI software developement tutorial

108
SETN 2010 TUTORIAL The so4ware management and engineering in the AIoriented projects www. .co.uk The so’ware management and engineering in the AIoriented projects www.SDART.co.uk

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 of Sdart AI software developement tutorial

Page 1: Sdart AI software developement tutorial

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  

Page 2: Sdart AI software developement tutorial

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  

Page 3: Sdart AI software developement tutorial

SETN  2010  -­‐  TUTORIAL  

The  so4ware  management  and  engineering  in    the  AI-­‐oriented  projects  

www. .co.uk

Introduc:on  

Page 4: Sdart AI software developement tutorial

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.  

Page 5: Sdart AI software developement tutorial

SETN  2010  -­‐  TUTORIAL  

The  so4ware  management  and  engineering  in    the  AI-­‐oriented  projects  

www. .co.uk

Project  success  

Success  

Budget  

Time  Quality  

Page 6: Sdart AI software developement tutorial

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  

Page 7: Sdart AI software developement tutorial

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  

Page 8: Sdart AI software developement tutorial

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  

Page 9: Sdart AI software developement tutorial

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    

Page 10: Sdart AI software developement tutorial

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  

Page 11: Sdart AI software developement tutorial

SETN  2010  -­‐  TUTORIAL  

The  so4ware  management  and  engineering  in    the  AI-­‐oriented  projects  

www. .co.uk

So'ware  project  management  

Page 12: Sdart AI software developement tutorial

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!  

Page 13: Sdart AI software developement tutorial

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  

Page 14: Sdart AI software developement tutorial

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  

Page 15: Sdart AI software developement tutorial

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  

Page 16: Sdart AI software developement tutorial

SETN  2010  -­‐  TUTORIAL  

The  so4ware  management  and  engineering  in    the  AI-­‐oriented  projects  

www. .co.uk

SEMMA  Search  

Explore  

Modify  

Model  

Assess  

Page 17: Sdart AI software developement tutorial

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  

Page 18: Sdart AI software developement tutorial

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  

Page 19: Sdart AI software developement tutorial

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  

Page 20: Sdart AI software developement tutorial

SETN  2010  -­‐  TUTORIAL  

The  so4ware  management  and  engineering  in    the  AI-­‐oriented  projects  

www. .co.uk

Risk  strategies  

§ Avoidance  

§ RetenEon  

§ Sharing  

§ ReducEon  

 

Page 21: Sdart AI software developement tutorial

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  

Page 22: Sdart AI software developement tutorial

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  

Page 23: Sdart AI software developement tutorial

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  

Page 24: Sdart AI software developement tutorial

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  

Page 25: Sdart AI software developement tutorial

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???  

Page 26: Sdart AI software developement tutorial

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  

Page 27: Sdart AI software developement tutorial

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

Page 28: Sdart AI software developement tutorial

SETN  2010  -­‐  TUTORIAL  

The  so4ware  management  and  engineering  in    the  AI-­‐oriented  projects  

www. .co.uk

M&LC  -­‐  spiral    

Spiral  model  –  Boehm  1988  

Page 29: Sdart AI software developement tutorial

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

Page 30: Sdart AI software developement tutorial

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?

Page 31: Sdart AI software developement tutorial

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  

Page 32: Sdart AI software developement tutorial

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  

Page 33: Sdart AI software developement tutorial

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  

Page 34: Sdart AI software developement tutorial

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  

Page 35: Sdart AI software developement tutorial

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  

Page 36: Sdart AI software developement tutorial

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  

Page 37: Sdart AI software developement tutorial

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  

Page 38: Sdart AI software developement tutorial

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  

Page 39: Sdart AI software developement tutorial

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  

Page 40: Sdart AI software developement tutorial

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  

Page 41: Sdart AI software developement tutorial

SETN  2010  -­‐  TUTORIAL  

The  so4ware  management  and  engineering  in    the  AI-­‐oriented  projects  

www. .co.uk

So'ware  design  

Page 42: Sdart AI software developement tutorial

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  

Page 43: Sdart AI software developement tutorial

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  

Page 44: Sdart AI software developement tutorial

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  

§ …  

Page 45: Sdart AI software developement tutorial

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  

Page 46: Sdart AI software developement tutorial

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  

Page 47: Sdart AI software developement tutorial

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  

Page 48: Sdart AI software developement tutorial

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  

Page 49: Sdart AI software developement tutorial

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  

Page 50: Sdart AI software developement tutorial

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  

Page 51: Sdart AI software developement tutorial

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  

Page 52: Sdart AI software developement tutorial

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  …  

Page 53: Sdart AI software developement tutorial

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  

Page 54: Sdart AI software developement tutorial

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

Page 55: Sdart AI software developement tutorial

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

Page 56: Sdart AI software developement tutorial

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

Page 57: Sdart AI software developement tutorial

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

Page 58: Sdart AI software developement tutorial

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  

Page 59: Sdart AI software developement tutorial

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  

Page 60: Sdart AI software developement tutorial

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

Page 61: Sdart AI software developement tutorial

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>

Page 62: Sdart AI software developement tutorial

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>

Page 63: Sdart AI software developement tutorial

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  

Page 64: Sdart AI software developement tutorial

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

Page 65: Sdart AI software developement tutorial

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  

Page 66: Sdart AI software developement tutorial

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  

Page 67: Sdart AI software developement tutorial

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  

Page 68: Sdart AI software developement tutorial

SETN  2010  -­‐  TUTORIAL  

The  so4ware  management  and  engineering  in    the  AI-­‐oriented  projects  

www. .co.uk

Bug  tracking  

§ Bugzilla  

§ Flyspray  

§ ManEs  

§ Trac  

§ Redmine  

Page 69: Sdart AI software developement tutorial

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

Page 70: Sdart AI software developement tutorial

SETN  2010  -­‐  TUTORIAL  

The  so4ware  management  and  engineering  in    the  AI-­‐oriented  projects  

www. .co.uk

AI  implementa:on  

Page 71: Sdart AI software developement tutorial

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  

Page 72: Sdart AI software developement tutorial

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

Page 73: Sdart AI software developement tutorial

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  

Page 74: Sdart AI software developement tutorial

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  

Page 75: Sdart AI software developement tutorial

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  

Page 76: Sdart AI software developement tutorial

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

Page 77: Sdart AI software developement tutorial

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.

Page 78: Sdart AI software developement tutorial

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  

Page 79: Sdart AI software developement tutorial

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)  

Page 80: Sdart AI software developement tutorial

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  

Page 81: Sdart AI software developement tutorial

SETN  2010  -­‐  TUTORIAL  

The  so4ware  management  and  engineering  in    the  AI-­‐oriented  projects  

www. .co.uk

Desktop  applica:ons  

§ C/C++  

§ Java  

§ C#  

§ Python  

Page 82: Sdart AI software developement tutorial

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)  

Page 83: Sdart AI software developement tutorial

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  

Page 84: Sdart AI software developement tutorial

SETN  2010  -­‐  TUTORIAL  

The  so4ware  management  and  engineering  in    the  AI-­‐oriented  projects  

www. .co.uk

Mobile  applica:ons  

§ Java  ME  

§ C++  

§ ObjecEve-­‐C  

Page 85: Sdart AI software developement tutorial

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  

Page 86: Sdart AI software developement tutorial

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  

Page 87: Sdart AI software developement tutorial

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  

Page 88: Sdart AI software developement tutorial

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  

Page 89: Sdart AI software developement tutorial

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  

Page 90: Sdart AI software developement tutorial

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  

Page 91: Sdart AI software developement tutorial

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

Page 92: Sdart AI software developement tutorial

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    

Page 93: Sdart AI software developement tutorial

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  

Page 94: Sdart AI software developement tutorial

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  

Page 95: Sdart AI software developement tutorial

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  

Page 96: Sdart AI software developement tutorial

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  

Page 97: Sdart AI software developement tutorial

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  

Page 98: Sdart AI software developement tutorial

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  

Page 99: Sdart AI software developement tutorial

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 ??

??? ??

Page 100: Sdart AI software developement tutorial

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/  

Page 101: Sdart AI software developement tutorial

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/  

Page 102: Sdart AI software developement tutorial

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/  

Page 103: Sdart AI software developement tutorial

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/  

Page 104: Sdart AI software developement tutorial

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  

Page 105: Sdart AI software developement tutorial

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  

Page 106: Sdart AI software developement tutorial

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  

 

Page 107: Sdart AI software developement tutorial

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  

Page 108: Sdart AI software developement tutorial

SETN  2010  -­‐  TUTORIAL  

The  so4ware  management  and  engineering  in    the  AI-­‐oriented  projects  

www. .co.uk

Thank  you.  Any  ques:ons?