22
AI & Gaming Letters from the Land of Lisp [email protected] http://tinyurl.com/ai-and-games

AI & gaming: letters from the land of lisp

Embed Size (px)

DESCRIPTION

Lessons learned from teaching cs472 (fourth year AI) using "land of lisp". Tim Menzies, May 2011

Citation preview

Page 1: AI & gaming: letters from the land of lisp

AI & Gaming

Letters from the Land of [email protected]

http://tinyurl.com/ai-and-games

Page 2: AI & gaming: letters from the land of lisp

2

Exciting times (1)

• Masters-level gaming certificate approved (finally)

Page 3: AI & gaming: letters from the land of lisp

3

Exciting times (2)

• Recent advances in complex visualizations• The manager game

Page 4: AI & gaming: letters from the land of lisp

4

Challenge• Teaching Dora

– 20 second attention span– These are my students

• Teaching hard (AI) stuff– Lazy evaluation of

infinite trees– Higher-order functional programming– Genetic algorithms– Graph theory– Etc

http://tinyurl.com/ai-and-games

Page 5: AI & gaming: letters from the land of lisp

5

Solution: Teach via Gaming

• Keeps Dora’s attention

• Responsible– Gaming is a

massive growth industry

– Gaming = jobs

2005 2006 2008 2009

0

1000

2000

3000

4000

5000

6000

2005 dollarscurrent dollars

USA economy

Gaming

0 2 4 6 8 10 12 14 16 18% growthhttp://tinyurl.com/ai-and-games

Page 6: AI & gaming: letters from the land of lisp

6

Teach games, in LISP

• Land of LISP– Conard Baraksi

• “Turns out the border between genius and insanity is a pretty cheery place” – Paul Graham

http://tinyurl.com/ai-and-games

Page 7: AI & gaming: letters from the land of lisp

7

Why LISP?• My predictor for success

at graduate studies– If you can handle LISP…

• Core view of computation

• It’s the source– LISP Scheme functional

languages– Scheme Io, Lua, etc, etc

• Innovations first prototypes in LISP– AI algorithms– Real-time operating

systems– Garbage collection– Object-oriented

programming– Logic programming

http://tinyurl.com/ai-and-games

Page 8: AI & gaming: letters from the land of lisp

8

Who cares? Old Man’s language!

http://tinyurl.com/ai-and-games

Page 9: AI & gaming: letters from the land of lisp

9

LOL: LISP is cool, again

http://tinyurl.com/ai-and-games

Page 10: AI & gaming: letters from the land of lisp

10

Smiles for all the girls and boys

http://tinyurl.com/ai-and-games

Page 11: AI & gaming: letters from the land of lisp

11

Gore! Not bore!

http://tinyurl.com/ai-and-games

Page 12: AI & gaming: letters from the land of lisp

12

Sneaks in Graph Theory

http://tinyurl.com/ai-and-games

Page 13: AI & gaming: letters from the land of lisp

13

Genetic algorithms

• Tiny desert world: one oasis• Populated by rats, learning

which way to run• 5,000,000 years later, two species– Both get enough to eat– One runs very fast, • stumbling back to the oasis

– One sits still in the oasis

http://tinyurl.com/ai-and-games

Page 14: AI & gaming: letters from the land of lisp

14

• Statistics• Graph theory• Emergent behaviors• Genetic programming• Functional programming• Running large experiments• Evolutionary algorithms

Careful, we might learn something

http://tinyurl.com/ai-and-games

Page 15: AI & gaming: letters from the land of lisp

15

Boiling frogs• LOL: pace so gentle, tasks so fun

– Students don’t realize how deep they are going

By the end of the book– Web-server,– Alpha-beta prune– Interactive graphics– Web server– Higher-order functions– Computation over

infinite structures• Using continuations

– Etc

http://tinyurl.com/ai-and-games

Page 16: AI & gaming: letters from the land of lisp

16

Now students wanna use LISP?

http://tinyurl.com/ai-and-gamesTrace elements of LISP detected

Page 17: AI & gaming: letters from the land of lisp

17

Another view of education

• Book1:– Comprehensive

coverage of a field– E.g. Cormen et al.

• Book2– Motivator– Come on in, the water’s fine– Samples the ocean, one toe at a time– Leaves you thirsty for more

http://tinyurl.com/ai-and-games

Page 18: AI & gaming: letters from the land of lisp

18

Pretty soon, they are ready for deep water

http://tinyurl.com/ai-and-games

• Its amazing what people can learn – When its fun.

– When they don’t realize they are “learning”

Page 19: AI & gaming: letters from the land of lisp

19

Four projects, 3 weeks each

1. LISP intro (chapters 1,2,3,4,5)2. Graph search (chapters 6,7,8 )– extending grand theft wumpus• If you die, your body explodes and stinks up the

neighborhood• Modify search so that next searcher surfs away from stink

3. 3. Genetic algorithms (chapters 9,10)– Add a second sex to the evolution game

4. The rest (10+)– Students choose

http://tinyurl.com/ai-and-games

Page 20: AI & gaming: letters from the land of lisp

20

More resources• On-line at WVU Safari on-line

• The rock video (3 mins long): – http://goo.gl/dmzv

• The author’s overview of the book (80 mins)– http://goo.gl/nKg5m– Set in week 1 as a homework assignment– Tested in a spot quiz

• Paul Graham: – Ansi common LISP – Excellent desk reference to LISP

• Peter Seibel– Practical Common LISP– LISP for industrial hackers

http://tinyurl.com/ai-and-games

Page 21: AI & gaming: letters from the land of lisp

21

What have I learned?

• Have we made education boring?– Probably

• Can we do better?– You betcha

http://tinyurl.com/ai-and-games

Page 22: AI & gaming: letters from the land of lisp

22

LOL= mad keen fun

http://tinyurl.com/ai-and-games