Artificially Artificially Intelligent Intelligent Haskell Haskell - - PowerPoint PPT Presentation

artificially artificially intelligent intelligent haskell
SMART_READER_LITE
LIVE PREVIEW

Artificially Artificially Intelligent Intelligent Haskell Haskell - - PowerPoint PPT Presentation

Artificially Artificially Intelligent Intelligent Haskell Haskell Overview About Aetion What we do, and how we do it H o w F P h a s ( a n d h a s n t ) h e l p e d About Aetion Approach to AI based on


slide-1
SLIDE 1

Artificially Artificially Intelligent Intelligent Haskell Haskell

slide-2
SLIDE 2

Overview

 About Aetion  What we do, and how we do it  H

  • w

F P h a s ( a n d h a s n ’ t ) h e l p e d

slide-3
SLIDE 3

About Aetion

 Approach to AI based on widening regions of

confidence based on explanatory necessity

 Most useful in domains with many

  • verlapping possibilities or sparse data

 Currently supported by DoD contracts

slide-4
SLIDE 4

The Challenges

 Frequent Changes

 Problem domains change  New domains  Changing approaches to existing domains

 Want to minimize code impact of changes

slide-5
SLIDE 5

The First Solution

 Minimize work on

things not directly relevant to current applications

 Fill in the gaps later.

slide-6
SLIDE 6

The First Solution

 Minimize work on

things not directly relevant to current applications

 Fill in the gaps later.

But:

 No general pattern for

extension

 Most problems

required non-localized changes.

slide-7
SLIDE 7

The Second Solution

 Find an abstraction and stick with it!  Blueprint for Second-system Effect  How did we make it work anyway?

slide-8
SLIDE 8

F P ’ s c

  • n

t r i b u t i o n s

 The types are cool  The code is short  The ideas are good

slide-9
SLIDE 9

The Types are Cool

 Find many bugs before they happen  Separating effectful and non-effectful code  BUT: extensible records would be handy

slide-10
SLIDE 10

The Code is Short

 Big advantage is not in writing, but in

rewriting.

slide-11
SLIDE 11

The Code is Short

 Big advantage is not in writing, but in

rewriting.

 10K lines of Haskell vs. 30K lines of Java

slide-12
SLIDE 12

The Ideas are Good

 Monads, arrows, continuations, various

combinator libraries, GADTs, even higher

  • rder functions.

 Makes over-generality easy.

slide-13
SLIDE 13

The Result

 Three projects:

 Generalized data/change management

(SNOWDRIFT)

○Maintains relational view of data with constant time

relation traversal

○Provides priority-based process scheduling ○Maintains tree of event handlers [Grust 1999] ○Starts lightweight threads based on thrown events

slide-14
SLIDE 14

Event Handlers

Ideal:

[ h |- confidence <|- (1 +) | i <- h |- linkedFrom Supports , i |- belief == Accepted ]

slide-15
SLIDE 15

Event Handlers

Ideal:

[ h |- confidence <|- (1 +) | i <- h |- linkedFrom Supports , i |- belief == Accepted ]

Actual, almost:

[ h |- confidence <|- (1 +) | ModAttr i Belief _ Accepted = theEvent , h <- i |- linkedFrom Supports ]

slide-16
SLIDE 16

The Result

 Three projects:

 Generalized data/change management  Inference rules (WINTERMUTE)

○Compositional constructers

makeNamed “blah” >>= makeLocated (4,5) >>= makeExplainer >>= addMutable

○Triggers propagate changes based on introduced

relationships

slide-17
SLIDE 17

The Result

 Three projects:

 Generalized data/change management  Inference rules  Application-specific hackery (PAWPRINTS)

○Mostly pure Haskell ○G

r a d u a l l y a b s t r a c t e d a n d m

  • v

e d “ u p ”

slide-18
SLIDE 18

The Result

 Three projects:

 Generalized data/change management  Inference rules  Application-specific hackery

 All work pretty well!

slide-19
SLIDE 19

R

  • g

u e ’ s G a l l e r y

 Concurrency

h |- attr <-- val But what about? h1 |- attr1 <-- val1 h2 |- attr2 <-- val2

slide-20
SLIDE 20

R

  • g

u e ’ s G a l l e r y

 Something more like:

h1,h2 |- attr1 h1 <-- val1 attr2 h2 <-- val2

 B

u t t h i s d

  • e

s n ’ t c

  • m

p

  • s

e

slide-21
SLIDE 21

R

  • g

u e ’ s G a l l e r y

 Records (Compositional Construction)

data Entity e => Thing e = Thing Stuff e makeFoo >>= makeBar >>= makeThing >>= addMutable Then, we want uniform access to composed objects: Class ThingLike t where getStuff :: t -> Stuff setStuff :: Stuff -> t -> t

slide-22
SLIDE 22

R

  • g

u e ’ s G a l l e r y

 Records (continued)

But then composition is hard: data Entity e => Thing e = Thing Stuff e instance (c e) => c (Entity e) where …

slide-23
SLIDE 23

Wh a t D i d n ’ t Wo r k

 Client/Server Interface

 Serialization requirements forced some design

decisions.

 Frequently pushing changes removed many

possible uses of laziness

slide-24
SLIDE 24

Wh a t D i d n ’ t Wo r k

 Client/Server Interface

 Serialization requirements forced some design

decisions.

 Frequently pushing changes removed many

possible uses of laziness

 B

u t : t h a t ’ s m

  • s

t l y

  • u

r f a u l t .

 Wh a

t ’ s t h e b e t t e r w a y ?

slide-25
SLIDE 25

Wh a t D i d n ’ t Wo r k

 Management buy-in

 Maintenance and maturity of libraries  Tools-related projects

slide-26
SLIDE 26

What Can Work Better

 Libraries working together  Cross-platform compatibility  More tools development

 Debugging  Profiling --- performance seems like a black art

 Programmer interest  But: chicken and egg problem?

slide-27
SLIDE 27

Thank you