際際滷

際際滷Share a Scribd company logo
Evolving Solutions
                                Machine Learning
                         Programs that Search for Solutions
                             Searching Random Points
                            Recursive Descent / Ascent
                                 Sub-Optimization

                                  Faulty Analogies
                                       Fitness
                                 Genetic Algorithms
                            Particle Swarm Optimization
                                Simulated Annealing



Monday, January 14, 13                                        1
Basic Concepts


Monday, January 14, 13                    2
Learning ==> Improvement

                Some quality is being improved.
                         There is some measure of good / bad.
                There is some way to move toward good.
                         Change position
                         Change behavior


Monday, January 14, 13                                          3
Learning ==>
  Some quality is being improved.

              Implies / Assumes:

                         There is consensus about good versus bad.

                         There is some way to measure good / bad.

              Give that measure a name: Fitness

                         Analogy to nature and evolution concept.


Monday, January 14, 13                                               4
Searching for Better
               Random Search

                         Randomize values in degrees of freedom.

                         Compare resulting 鍖tness.

                         Pick the best results.

                         And then what?

               Recursive Descent / Ascent

                         Assumes that solution space has a gradient.

                         Assumes there are minima / maxima.
Monday, January 14, 13                                                 5
Seeker:
 When do you quit searching?
               In鍖nite Loop versus Stopping Condition

               Eventually we run out of time / resource / energy.


               Complications:

                         Sometimes Best is not well-de鍖ned.

                         The solution space is continuously changing.

                         The shape (gradient qualities) of space is unknown.
Monday, January 14, 13                                                         6
Faulty
                         Analogs
Monday, January 14, 13             7
Evolution
              There is some way to measure 鍖tness

              Fitness is a function of a set of objects
              that can vary over individual instances.

              Call the objects genes to use genetic analogy.

              Mutation ==> Changing the values of genes.

              Sexual Reproduction
              ==> Merging gene sequences.

              Next Generation <== keep most 鍖t, cull least 鍖t.
Monday, January 14, 13                                           8
Genetic Algorithm
              De鍖ne degrees of freedom ==> genes.

              Produce 鍖rst generation with randomized genes.

              Evaluate 鍖tness of each individual

                         Calculate / Run a simulation of environment.

              Keep most 鍖t <==> Cull least 鍖t.

              Populate the next generation. ( mutate and/or splice )

              Repeat until done

                         Note: Real environments change over time.
Monday, January 14, 13                                                  9
Main Loop In Smalltalk




Monday, January 14, 13                        10
Next Generation




Monday, January 14, 13                     11
Mutation




Monday, January 14, 13              12
Degrees Of Freedom




Monday, January 14, 13                    13
See Also: Java Example
                               for
                       Traveling Salesman

      http://code.google.com/p/java-traveling-salesman/
                       source/checkout




Monday, January 14, 13                                    14
Insect (Swarm) Behavior


             Swarms search for food / Encounter intruders
             -- mostly random search.

             Insects communicate with their buddies.

             Their buddies re-direct their paths to gather / 鍖ght.




Monday, January 14, 13                                               15
Particle Swarm Optimization
             Mixed Analogy: Particle <==> Flying insect.

             Particles have position in multi-dimensional space.

             Assign each particle to a group swarm (at random).

             After 鍖tness is evaluated, particles move toward the
             most 鍖t particle in their swarm.

             The most 鍖t particle in the swarm
             can stay where it is, ascend, or dither (random move).

             Recursive ascent / descent may guide moves
             if the space is believed to be reasonably continuous.
Monday, January 14, 13                                                16
http://vimeo.com/17407010




Monday, January 14, 13                  17
Stopping Conditions
             How good is good enough?

             Genetic Algorithms and Particle Swarm Optimization
             can provide multiple solutions.

             Stop when best 鍖tness is no longer improving.

             Stop when move method is no longer moving anything.

             Stop at some arbitrary limit:

                         Number of generations.

                         Time limit.

Monday, January 14, 13                                             18
Simulated Annealing
               Concept: Temperature ==> Energy Available.

                         Energy ==> speed of movement.

                         Speed == How much change from step to step?

               Annealing == Cooling at controlled rate ==>
               The allowed change decreases from step to step.

               Stopping Condition:

                         Temperature (Change/Step) goes to zero.

                         Other stopping conditions may also apply.

Monday, January 14, 13                                                 19
赫看岳界鞄温s
             Experts refuse to say optimum / optimal / optimized

                         No way to verify solution is best possible.

                         Parameters selected may not cover everything.

                         Say sub-optimal or satis鍖ces (good enough)

             Solution is only good inside your simulation.

                         Real world is certainly different.

             Dont over-train: Solution may lack 鍖exibility.
Monday, January 14, 13                                                    20
Visualization
             How do you visualize position in hyperspace?

             Assign each degree of freedom to some geometry.

                    3 degrees (x,y,z) ==> position

                    2 degrees (angle, angle) ==> orientation of axis

                    additional degrees ==> shape dimensions

             Example: Torus (donut) Shape -- 9 shape dimensions

                    Radius, Eccentricity, Angle (?), r, e, a

                    frequency of: twist, wave, bulge
Monday, January 14, 13                                                   21
http://megaswf.com/serve/




Monday, January 14, 13                   22
Lessons Learned
             I did not and do not expect this to work.
             It is just something I always wanted to tinker.

             Best 鍖tness for 2007-2008: Stay out of the market!

             When-to-buy was competing with when-to-sell
             and producing counter-productive results.
             ==> Need more complex strategy ==> more parameters.

             Very compute intensive (generation takes way too long)
             ==> Need faster data structure ==> Refactor database.
             ==> Squeak VM is single-thread ==> Port to Erlang ???
             ==> Potential GPU application.

Monday, January 14, 13                                                23

More Related Content

Recently uploaded (20)

Blockchain for Businesses Practical Use Cases & Benefits.pdf
Blockchain for Businesses Practical Use Cases & Benefits.pdfBlockchain for Businesses Practical Use Cases & Benefits.pdf
Blockchain for Businesses Practical Use Cases & Benefits.pdf
Yodaplus Technologies Private Limited
10 FinTech Solutions Every Business Should Know!.pdf
10 FinTech Solutions Every Business Should Know!.pdf10 FinTech Solutions Every Business Should Know!.pdf
10 FinTech Solutions Every Business Should Know!.pdf
Yodaplus Technologies Private Limited
Teaching Prompting and Prompt Sharing to End Users.pptx
Teaching Prompting and Prompt Sharing to End Users.pptxTeaching Prompting and Prompt Sharing to End Users.pptx
Teaching Prompting and Prompt Sharing to End Users.pptx
Michael Blumenthal (Microsoft MVP)
Cloud of everything Tech of the 21 century in Aviation
Cloud of everything Tech of the 21 century in AviationCloud of everything Tech of the 21 century in Aviation
Cloud of everything Tech of the 21 century in Aviation
Assem mousa
Combining Lexical and Semantic Search with Milvus 2.5
Combining Lexical and Semantic Search with Milvus 2.5Combining Lexical and Semantic Search with Milvus 2.5
Combining Lexical and Semantic Search with Milvus 2.5
Zilliz
Not a Kubernetes fan? The state of PaaS in 2025
Not a Kubernetes fan? The state of PaaS in 2025Not a Kubernetes fan? The state of PaaS in 2025
Not a Kubernetes fan? The state of PaaS in 2025
Anthony Dahanne
Unlocking DevOps Secuirty :Vault & Keylock
Unlocking DevOps Secuirty :Vault & KeylockUnlocking DevOps Secuirty :Vault & Keylock
Unlocking DevOps Secuirty :Vault & Keylock
HusseinMalikMammadli
AI Trends and Fun Demos Sothebys Rehoboth Presentation
AI Trends and Fun Demos  Sothebys Rehoboth PresentationAI Trends and Fun Demos  Sothebys Rehoboth Presentation
AI Trends and Fun Demos Sothebys Rehoboth Presentation
Ethan Holland
Build with AI on Google Cloud Session #3
Build with AI on Google Cloud Session #3Build with AI on Google Cloud Session #3
Build with AI on Google Cloud Session #3
Margaret Maynard-Reid
Q4 2024 Earnings and Investor Presentation
Q4 2024 Earnings and Investor PresentationQ4 2024 Earnings and Investor Presentation
Q4 2024 Earnings and Investor Presentation
Dropbox
ISOIEC 42001 AI Management System 際際滷s
ISOIEC 42001 AI Management System 際際滷sISOIEC 42001 AI Management System 際際滷s
ISOIEC 42001 AI Management System 際際滷s
GilangRamadhan884333
L01 Introduction to Nanoindentation - What is hardness
L01 Introduction to Nanoindentation - What is hardnessL01 Introduction to Nanoindentation - What is hardness
L01 Introduction to Nanoindentation - What is hardness
RostislavDaniel
DealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures CapitalDealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures Capital
Yevgen Sysoyev
EaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial KeyEaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial Key
kherorpacca127
Getting Started with AWS - Enterprise Landing Zone for Terraform Learning & D...
Getting Started with AWS - Enterprise Landing Zone for Terraform Learning & D...Getting Started with AWS - Enterprise Landing Zone for Terraform Learning & D...
Getting Started with AWS - Enterprise Landing Zone for Terraform Learning & D...
Chris Wahl
Predictive vs. Preventive Maintenance Which One is Right for Your Factory
Predictive vs. Preventive Maintenance  Which One is Right for Your FactoryPredictive vs. Preventive Maintenance  Which One is Right for Your Factory
Predictive vs. Preventive Maintenance Which One is Right for Your Factory
Diagsense ltd
Webinar: LF Energy GEISA: Addressing edge interoperability at the meter
Webinar: LF Energy GEISA: Addressing edge interoperability at the meterWebinar: LF Energy GEISA: Addressing edge interoperability at the meter
Webinar: LF Energy GEISA: Addressing edge interoperability at the meter
DanBrown980551
Revolutionizing Field Service: How LLMs Are Powering Smarter Knowledge Access...
Revolutionizing Field Service: How LLMs Are Powering Smarter Knowledge Access...Revolutionizing Field Service: How LLMs Are Powering Smarter Knowledge Access...
Revolutionizing Field Service: How LLMs Are Powering Smarter Knowledge Access...
Earley Information Science
5 Best Agentic AI Frameworks for 2025.pdf
5 Best Agentic AI Frameworks for 2025.pdf5 Best Agentic AI Frameworks for 2025.pdf
5 Best Agentic AI Frameworks for 2025.pdf
SoluLab1231
DevNexus - Building 10x Development Organizations.pdf
DevNexus - Building 10x Development Organizations.pdfDevNexus - Building 10x Development Organizations.pdf
DevNexus - Building 10x Development Organizations.pdf
Justin Reock
Cloud of everything Tech of the 21 century in Aviation
Cloud of everything Tech of the 21 century in AviationCloud of everything Tech of the 21 century in Aviation
Cloud of everything Tech of the 21 century in Aviation
Assem mousa
Combining Lexical and Semantic Search with Milvus 2.5
Combining Lexical and Semantic Search with Milvus 2.5Combining Lexical and Semantic Search with Milvus 2.5
Combining Lexical and Semantic Search with Milvus 2.5
Zilliz
Not a Kubernetes fan? The state of PaaS in 2025
Not a Kubernetes fan? The state of PaaS in 2025Not a Kubernetes fan? The state of PaaS in 2025
Not a Kubernetes fan? The state of PaaS in 2025
Anthony Dahanne
Unlocking DevOps Secuirty :Vault & Keylock
Unlocking DevOps Secuirty :Vault & KeylockUnlocking DevOps Secuirty :Vault & Keylock
Unlocking DevOps Secuirty :Vault & Keylock
HusseinMalikMammadli
AI Trends and Fun Demos Sothebys Rehoboth Presentation
AI Trends and Fun Demos  Sothebys Rehoboth PresentationAI Trends and Fun Demos  Sothebys Rehoboth Presentation
AI Trends and Fun Demos Sothebys Rehoboth Presentation
Ethan Holland
Build with AI on Google Cloud Session #3
Build with AI on Google Cloud Session #3Build with AI on Google Cloud Session #3
Build with AI on Google Cloud Session #3
Margaret Maynard-Reid
Q4 2024 Earnings and Investor Presentation
Q4 2024 Earnings and Investor PresentationQ4 2024 Earnings and Investor Presentation
Q4 2024 Earnings and Investor Presentation
Dropbox
ISOIEC 42001 AI Management System 際際滷s
ISOIEC 42001 AI Management System 際際滷sISOIEC 42001 AI Management System 際際滷s
ISOIEC 42001 AI Management System 際際滷s
GilangRamadhan884333
L01 Introduction to Nanoindentation - What is hardness
L01 Introduction to Nanoindentation - What is hardnessL01 Introduction to Nanoindentation - What is hardness
L01 Introduction to Nanoindentation - What is hardness
RostislavDaniel
DealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures CapitalDealBook of Ukraine: 2025 edition | AVentures Capital
DealBook of Ukraine: 2025 edition | AVentures Capital
Yevgen Sysoyev
EaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial KeyEaseUS Partition Master Crack 2025 + Serial Key
EaseUS Partition Master Crack 2025 + Serial Key
kherorpacca127
Getting Started with AWS - Enterprise Landing Zone for Terraform Learning & D...
Getting Started with AWS - Enterprise Landing Zone for Terraform Learning & D...Getting Started with AWS - Enterprise Landing Zone for Terraform Learning & D...
Getting Started with AWS - Enterprise Landing Zone for Terraform Learning & D...
Chris Wahl
Predictive vs. Preventive Maintenance Which One is Right for Your Factory
Predictive vs. Preventive Maintenance  Which One is Right for Your FactoryPredictive vs. Preventive Maintenance  Which One is Right for Your Factory
Predictive vs. Preventive Maintenance Which One is Right for Your Factory
Diagsense ltd
Webinar: LF Energy GEISA: Addressing edge interoperability at the meter
Webinar: LF Energy GEISA: Addressing edge interoperability at the meterWebinar: LF Energy GEISA: Addressing edge interoperability at the meter
Webinar: LF Energy GEISA: Addressing edge interoperability at the meter
DanBrown980551
Revolutionizing Field Service: How LLMs Are Powering Smarter Knowledge Access...
Revolutionizing Field Service: How LLMs Are Powering Smarter Knowledge Access...Revolutionizing Field Service: How LLMs Are Powering Smarter Knowledge Access...
Revolutionizing Field Service: How LLMs Are Powering Smarter Knowledge Access...
Earley Information Science
5 Best Agentic AI Frameworks for 2025.pdf
5 Best Agentic AI Frameworks for 2025.pdf5 Best Agentic AI Frameworks for 2025.pdf
5 Best Agentic AI Frameworks for 2025.pdf
SoluLab1231
DevNexus - Building 10x Development Organizations.pdf
DevNexus - Building 10x Development Organizations.pdfDevNexus - Building 10x Development Organizations.pdf
DevNexus - Building 10x Development Organizations.pdf
Justin Reock

Featured (20)

2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design ProcessStorytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
Artificial Intelligence, Data and Competition SCHREPEL June 2024 OECD dis...
Artificial Intelligence, Data and Competition  SCHREPEL  June 2024 OECD dis...Artificial Intelligence, Data and Competition  SCHREPEL  June 2024 OECD dis...
Artificial Intelligence, Data and Competition SCHREPEL June 2024 OECD dis...
OECD Directorate for Financial and Enterprise Affairs
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
2024 State of Marketing Report by Hubspot
2024 State of Marketing Report  by Hubspot2024 State of Marketing Report  by Hubspot
2024 State of Marketing Report by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing2024 Trend Updates: What Really Works In SEO & Content Marketing
2024 Trend Updates: What Really Works In SEO & Content Marketing
Search Engine Journal
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design ProcessStorytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
How to Leverage AI to Boost Employee Wellness - Lydia Di Francesco - SocialHR...
SocialHRCamp
2024 State of Marketing Report by Hubspot
2024 State of Marketing Report  by Hubspot2024 State of Marketing Report  by Hubspot
2024 State of Marketing Report by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray

Genetic algorithms

  • 1. Evolving Solutions Machine Learning Programs that Search for Solutions Searching Random Points Recursive Descent / Ascent Sub-Optimization Faulty Analogies Fitness Genetic Algorithms Particle Swarm Optimization Simulated Annealing Monday, January 14, 13 1
  • 3. Learning ==> Improvement Some quality is being improved. There is some measure of good / bad. There is some way to move toward good. Change position Change behavior Monday, January 14, 13 3
  • 4. Learning ==> Some quality is being improved. Implies / Assumes: There is consensus about good versus bad. There is some way to measure good / bad. Give that measure a name: Fitness Analogy to nature and evolution concept. Monday, January 14, 13 4
  • 5. Searching for Better Random Search Randomize values in degrees of freedom. Compare resulting 鍖tness. Pick the best results. And then what? Recursive Descent / Ascent Assumes that solution space has a gradient. Assumes there are minima / maxima. Monday, January 14, 13 5
  • 6. Seeker: When do you quit searching? In鍖nite Loop versus Stopping Condition Eventually we run out of time / resource / energy. Complications: Sometimes Best is not well-de鍖ned. The solution space is continuously changing. The shape (gradient qualities) of space is unknown. Monday, January 14, 13 6
  • 7. Faulty Analogs Monday, January 14, 13 7
  • 8. Evolution There is some way to measure 鍖tness Fitness is a function of a set of objects that can vary over individual instances. Call the objects genes to use genetic analogy. Mutation ==> Changing the values of genes. Sexual Reproduction ==> Merging gene sequences. Next Generation <== keep most 鍖t, cull least 鍖t. Monday, January 14, 13 8
  • 9. Genetic Algorithm De鍖ne degrees of freedom ==> genes. Produce 鍖rst generation with randomized genes. Evaluate 鍖tness of each individual Calculate / Run a simulation of environment. Keep most 鍖t <==> Cull least 鍖t. Populate the next generation. ( mutate and/or splice ) Repeat until done Note: Real environments change over time. Monday, January 14, 13 9
  • 10. Main Loop In Smalltalk Monday, January 14, 13 10
  • 13. Degrees Of Freedom Monday, January 14, 13 13
  • 14. See Also: Java Example for Traveling Salesman http://code.google.com/p/java-traveling-salesman/ source/checkout Monday, January 14, 13 14
  • 15. Insect (Swarm) Behavior Swarms search for food / Encounter intruders -- mostly random search. Insects communicate with their buddies. Their buddies re-direct their paths to gather / 鍖ght. Monday, January 14, 13 15
  • 16. Particle Swarm Optimization Mixed Analogy: Particle <==> Flying insect. Particles have position in multi-dimensional space. Assign each particle to a group swarm (at random). After 鍖tness is evaluated, particles move toward the most 鍖t particle in their swarm. The most 鍖t particle in the swarm can stay where it is, ascend, or dither (random move). Recursive ascent / descent may guide moves if the space is believed to be reasonably continuous. Monday, January 14, 13 16
  • 18. Stopping Conditions How good is good enough? Genetic Algorithms and Particle Swarm Optimization can provide multiple solutions. Stop when best 鍖tness is no longer improving. Stop when move method is no longer moving anything. Stop at some arbitrary limit: Number of generations. Time limit. Monday, January 14, 13 18
  • 19. Simulated Annealing Concept: Temperature ==> Energy Available. Energy ==> speed of movement. Speed == How much change from step to step? Annealing == Cooling at controlled rate ==> The allowed change decreases from step to step. Stopping Condition: Temperature (Change/Step) goes to zero. Other stopping conditions may also apply. Monday, January 14, 13 19
  • 20. 赫看岳界鞄温s Experts refuse to say optimum / optimal / optimized No way to verify solution is best possible. Parameters selected may not cover everything. Say sub-optimal or satis鍖ces (good enough) Solution is only good inside your simulation. Real world is certainly different. Dont over-train: Solution may lack 鍖exibility. Monday, January 14, 13 20
  • 21. Visualization How do you visualize position in hyperspace? Assign each degree of freedom to some geometry. 3 degrees (x,y,z) ==> position 2 degrees (angle, angle) ==> orientation of axis additional degrees ==> shape dimensions Example: Torus (donut) Shape -- 9 shape dimensions Radius, Eccentricity, Angle (?), r, e, a frequency of: twist, wave, bulge Monday, January 14, 13 21
  • 23. Lessons Learned I did not and do not expect this to work. It is just something I always wanted to tinker. Best 鍖tness for 2007-2008: Stay out of the market! When-to-buy was competing with when-to-sell and producing counter-productive results. ==> Need more complex strategy ==> more parameters. Very compute intensive (generation takes way too long) ==> Need faster data structure ==> Refactor database. ==> Squeak VM is single-thread ==> Port to Erlang ??? ==> Potential GPU application. Monday, January 14, 13 23