Download presentation
Presentation is loading. Please wait.
Published byMadeleine Wheeler Modified over 9 years ago
1
Intelligence Musical and Otherwise
2
Huh? Huh?
3
Webster’s definition Intelligence: The ability to reason
4
Webster’s definition Reason The capacity for intelligence
5
AI class Learn, consciousness, sense of humor, understanding, love, creativity, think, imagination, analysis, logic, analogy, association, abstraction, reasoning, intuition, dream, adapt, aware of death, memory, skill set, appreciate, sacrifice, control, win, predict, cry, honor, compute, suicide, lie, invent, communication, converse, perceive
6
Our definition. 1. Learn 2. Reason 3. Abstract
7
Enjoy? Enjoy?
8
GAs
9
Genetic Algorithms Definition a computer simulation in which a population of abstract representations (called chromosomes, genotype, or genome) of candidate solutions (called individuals, creatures, or phenotypes) to an optimization problem evolves toward better solutions. Basics A genetic representation of the solution domain, A fitness function to evaluate the solution domain. Along the way crossover and mutation Fitness tests Until a solution is found that satisfies minimum criteria
11
Karl Sims Evolved Virtual Creatures Not an animation Evolved objects in motion Encased in various media (water, air, etc.) With gravity
12
Evolved Virtual Creatures
13
In lisp Creating a very simple genetic algorithm for producing melodies of a certain type
14
Step 1 1. program a class of objects that have music melodies as attributes
15
Step 2 2. create a whole bunch, say 100, of instances of this object class (initial population)
16
Step 3 3. give the objects a (fitness test) based on overall interval direction, say 9 [stop when fulfilled]
17
Step 4 4. the ones closest survive (selection), the rest are discarded
18
Step 5 5. the remaining ones (mate)
19
Step 6 6. their offspring inherit (crossover) the general shape of the parents combined melodies
20
Step 7 7. maybe a (mutation) creeps in
21
Step 8 8. return to step 3
22
1. program a class of objects that have music melodies as attributes 2. create a whole bunch, say 100, of instances of this object class (initial population) 3. give the objects a (fitness test) based on overall interval direction, say 9 [stop when fulfilled] 4. the ones closest survive (selection), the rest are discarded 5. the remaining ones (mate) 6. their offspring inherit (crossover) the general shape of the parents combined melodies 7. maybe a (mutation) creeps in 8. return to step 3
23
Variables ;;;variables (defvar *mutation* (defvar *allowable-deviation*
24
Object ;;;class of object with one attribute (a melody) (defclass individual () ((melody :initarg :melody :initform nil :accessor melody)) (:documentation "Our objects in the evolutionary potboiler."))
25
Functions ;;;functions (defun melody (defun fitness (defun mate (defun inherit (defun mutation
26
Top level ;;;top-level (defun produce-crossover-melodies
27
MGC ;;;use MGC to quickly turn into a midi file (mgc "GA-1.mid" :ontimes '() :pitches '() :durations '() :channels '() :dynamics '())
28
(defvar *mutation* (defvar *allowable-deviation* (defclass individual () ((melody :initarg :melody :initform nil :accessor melody)) ((melody :initarg :melody :initform nil :accessor melody)) (:documentation "Our objects in the evolutionary potboiler.")) (:documentation "Our objects in the evolutionary potboiler.")) (setf i-1 (make-instance 'individual)) (defun melody (defun fitness (defun mate (defun inherit (defun mutation (defun produce-crossover-melodies (mgc "GA-1.mid" :ontimes '() :pitches '() :durations '() :channels '() :dynamics '())
29
Interesting Music? Example Example
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.