<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3682857354725297944</id><updated>2011-11-07T04:19:23.289-08:00</updated><title type='text'>Adventures in Programming and Machine Learning</title><subtitle type='html'>The purpose of this blog is to educate myself and others about becoming great programmers, moving toward the goal of coding up strong Artificial Intelligence and Machine Learning applications.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>32</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-8966886982622723562</id><published>2011-03-05T05:57:00.001-08:00</published><updated>2011-03-05T05:57:55.644-08:00</updated><title type='text'>Bulletproof code.</title><content type='html'>What has been helping me out is the phrase: "Code that cannot fail is infinitely easier to maintain then code that has many paths through it which might fail."&lt;br /&gt;&lt;br /&gt;Murphy's law: "What can go wrong WILL go wrong". So go over every line of code and ask: "How might this function do something unintended?". If you find any answer to that question then you need to change how the function works until the answer is: "This function physically cannot do something unintended". If the hardware and compiler are working to specification then the ONLY path through this code is the correct way through (or a pretty exception/error that tells you what the programmer/user did wrong or what the hardware/compiler failure was).&lt;br /&gt;&lt;br /&gt;For example: you have a function calculate() which takes a collection of Strings which represents items to process. The problem is that function foo() might run incorrectly and some String items may become invalid or incorrect. Then calculate() will make its best attempt, then calculate may throw an exception/error or worst of all, it may work. The solution here is to make it physically impossible for the items in the list to become invalid/wrong, don't use an array of String, use an array of class Student/Airplane/Book/ProcessItem which has a constructor which validates its own existence as soon as it is made, it will produce a runtime error (or better yet a compile time error) the instant the programmer/user made a mistake.&lt;br /&gt;&lt;br /&gt;The millions of unintended paths through calculate() which may throw a cryptic runtime exception has been eliminated. Imagine how much easier it is to diagnose a "InputProcessItemException" than a cryptic off-by-one error inside calculate();&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-8966886982622723562?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/8966886982622723562/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2011/03/bulletproof-code.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/8966886982622723562'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/8966886982622723562'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2011/03/bulletproof-code.html' title='Bulletproof code.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-2750017069975663038</id><published>2010-10-20T09:03:00.000-07:00</published><updated>2010-10-20T09:07:00.328-07:00</updated><title type='text'>ASP.NET Script injection quiz.</title><content type='html'>What is wrong with using this in your ASP.NET code?&lt;br /&gt;&lt;br /&gt;&amp;lt;%=  textbox.value &amp;gt;&lt;br /&gt;&lt;br /&gt;Answer:  It allows script injection.  Any user generated content should be considered malicious.  This line gives someone access to run commands.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-2750017069975663038?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/2750017069975663038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2010/10/aspnet-script-injection-quiz.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/2750017069975663038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/2750017069975663038'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2010/10/aspnet-script-injection-quiz.html' title='ASP.NET Script injection quiz.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-2916907487831889537</id><published>2010-09-11T13:44:00.000-07:00</published><updated>2010-09-11T15:12:12.290-07:00</updated><title type='text'>Get PowerShell for Windows XP.</title><content type='html'>Get Windows Power Shell for Windows XP, it'll blow you away!&lt;br /&gt;&lt;br /&gt;&lt;a href=" http://machinesentience.com/windows_xp_powershell_evaluation.html"&gt;&lt;br /&gt;http://machinesentience.com/windows_xp_powershell_evaluation.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-2916907487831889537?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/2916907487831889537/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2010/09/get-powershell-for-windows-xp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/2916907487831889537'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/2916907487831889537'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2010/09/get-powershell-for-windows-xp.html' title='Get PowerShell for Windows XP.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-2890496044680428872</id><published>2010-09-11T07:47:00.000-07:00</published><updated>2010-09-11T08:02:50.781-07:00</updated><title type='text'>Real life uses for Genetic Algorithms.</title><content type='html'>I just had a huge idea, just now, a genetic algorithm program that has instantaneous access to your brain's mental state, and can play music/video or sound files.  The computer would play things, then examine your mental state after that, then you can tell the computer to optimize for a mental state.  Woah, I sense a billion dollars to be made championing something like that.  Every human would want it.  A bliss machine.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Evolutionary Sodoku solver:&lt;br /&gt;&lt;a href="http://watchmaker.uncommons.org/examples/sudoku.php"&gt;http://watchmaker.uncommons.org/examples/sudoku.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Professional stock trading:&lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/1538235/what-problems-have-you-solved-using-genetic-algorithms-genetic-programming/1538464#1538464"&gt;http://stackoverflow.com/questions/1538235/what-problems-have-you-solved-using-genetic-algorithms-genetic-programming/1538464#1538464&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Identify stolen credit cards inside MMO's. &lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/1538235/what-problems-have-you-solved-using-genetic-algorithms-genetic-programming/1589627#1589627"&gt;http://stackoverflow.com/questions/1538235/what-problems-have-you-solved-using-genetic-algorithms-genetic-programming/1589627#1589627&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Best way to load freight into a truck:&lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/1538235/what-problems-have-you-solved-using-genetic-algorithms-genetic-programming/1589612#1589612"&gt;http://stackoverflow.com/questions/1538235/what-problems-have-you-solved-using-genetic-algorithms-genetic-programming/1589612#1589612&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Little digital critters in a world with eyes and ears collaborating:&lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/1538235/what-problems-have-you-solved-using-genetic-algorithms-genetic-programming/1575154#1575154"&gt;http://stackoverflow.com/questions/1538235/what-problems-have-you-solved-using-genetic-algorithms-genetic-programming/1575154#1575154&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Football Tipping:&lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/1538235/what-problems-have-you-solved-using-genetic-algorithms-genetic-programming/1575855#1575855"&gt;http://stackoverflow.com/questions/1538235/what-problems-have-you-solved-using-genetic-algorithms-genetic-programming/1575855#1575855&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-2890496044680428872?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/2890496044680428872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2010/09/real-life-uses-for-genetic-algorithms.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/2890496044680428872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/2890496044680428872'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2010/09/real-life-uses-for-genetic-algorithms.html' title='Real life uses for Genetic Algorithms.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-4336254248649868799</id><published>2010-09-10T07:56:00.000-07:00</published><updated>2010-09-10T07:57:52.615-07:00</updated><title type='text'>Profile of a Sociopath</title><content type='html'>Profile of a Sociopath&lt;br /&gt;&lt;br /&gt;I know it's not much to do with programming, but it tends to run in some programmers themselves so I thought it was extremely relevant.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.mcafee.cc/Bin/sb.html"&gt;http://www.mcafee.cc/Bin/sb.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-4336254248649868799?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/4336254248649868799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2010/09/profile-of-sociopath.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/4336254248649868799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/4336254248649868799'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2010/09/profile-of-sociopath.html' title='Profile of a Sociopath'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-638016569471468796</id><published>2010-09-07T09:59:00.000-07:00</published><updated>2010-09-07T10:02:39.568-07:00</updated><title type='text'>How to install Apache 7 on Windows 7</title><content type='html'>Here is how to install Apache 7 on Windows 7:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1.  Go to http://tomcat.apache.org/download-70.cgi&lt;br /&gt;&lt;br /&gt;2.  Download the  '32-bit/64-bit Windows Service Installer'&lt;br /&gt;&lt;br /&gt;3.  Run the exe installer, follow the directions.  &lt;br /&gt;&lt;br /&gt;4.  Restart the computer.&lt;br /&gt;&lt;br /&gt;5.  In the start menu, find the 'configure apache' button.  You have to run it as administrator or it will fail.&lt;br /&gt;&lt;br /&gt;6.  Navigate to http://localhost:8080&lt;br /&gt;&lt;br /&gt;7.  Do the tutorials.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-638016569471468796?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/638016569471468796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2010/09/how-to-install-apache-7-on-windows-7.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/638016569471468796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/638016569471468796'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2010/09/how-to-install-apache-7-on-windows-7.html' title='How to install Apache 7 on Windows 7'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-4966377659245769012</id><published>2010-08-18T13:36:00.000-07:00</published><updated>2010-08-18T13:54:40.184-07:00</updated><title type='text'>Changing the colors of the console.</title><content type='html'>Changing the colors of your Linux console/shell is important when your scrolling through black text and you want your eyes to spot the shell line quickly.&lt;br /&gt;&lt;br /&gt;If you want to change the colors of your Fedora Linux console line you have to change the PS1 Variable.  Here is how I did it:&lt;br /&gt;&lt;br /&gt;Step 1:  Open up a console.&lt;br /&gt;Step 2:  Login as super user.&lt;br /&gt;Step 3:  Open up the file /home/yourhome/.bashrc&lt;br /&gt;Step 4:  Add this line anywhere after the invocation of /etc/bashrc (outside of the if block):&lt;br /&gt;&lt;br /&gt;export PS1="[\e[0;31m\u\e[m@\e[0;34m\h \W \e[m]\$ "&lt;br /&gt;&lt;br /&gt;Step 5:  Save the file and restart the console.  &lt;br /&gt;Step 6:  You should see red and blue showing for your shell. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;If the codes above confuse you, don't worry, it seems to be a home-brew bash code system.  \e[x;y  means 'begin color' and \e[m means 'end color'.  The escape codes are somewhat straight forward though.  &lt;br /&gt;&lt;br /&gt;Check out this website for more info on the escape codes:&lt;br /&gt;&lt;a href="http://www.cyberciti.biz/faq/bash-shell-change-the-color-of-my-shell-prompt-under-linux-or-unix/"&gt;http://www.cyberciti.biz/faq/bash-shell-change-the-color-of-my-shell-prompt-under-linux-or-unix/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-4966377659245769012?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/4966377659245769012/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2010/08/changing-colors-of-console.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/4966377659245769012'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/4966377659245769012'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2010/08/changing-colors-of-console.html' title='Changing the colors of the console.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-2627390716032162025</id><published>2010-08-17T14:58:00.000-07:00</published><updated>2010-08-17T14:59:55.365-07:00</updated><title type='text'>Really good Java Tutorials</title><content type='html'>I'm always in search of a good tutorial, this Java tutorial is Amazing, it lets you know everything you need to know, while omitting the unnecessary.&lt;br /&gt;&lt;br /&gt;There are 39 chapters, broken out into bite sized bits of knowledge.  I'll be spending a few days chomping on this.&lt;br /&gt;&lt;br /&gt;http://www.java2s.com/Tutorial/Java/0160__Thread/Catalog0160__Thread.htm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-2627390716032162025?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/2627390716032162025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2010/08/really-good-java-tutorials.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/2627390716032162025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/2627390716032162025'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2010/08/really-good-java-tutorials.html' title='Really good Java Tutorials'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-328131611496265994</id><published>2010-08-16T13:02:00.000-07:00</published><updated>2010-08-16T13:11:54.585-07:00</updated><title type='text'>Cleaning a url from the klipboard and opening the file.</title><content type='html'>I find myself wanting to open a file that I've copied from the url quite a bit.  &lt;br /&gt;&lt;br /&gt;1.  Copy the url.&lt;br /&gt;2.  Open the necessary program.&lt;br /&gt;3.  Choose open, paste the link.&lt;br /&gt;4.  Edit the file.&lt;br /&gt;&lt;br /&gt;I want to reduce this 4 step process to one.  The problem is that the full URL has 'localhost' junk in front of it, and I want to trim that out.&lt;br /&gt;&lt;br /&gt;It would be faster if I could bind all these actions to F6.  Here is how to do it:&lt;br /&gt;&lt;br /&gt;Here is a little script that yanks the clipboard content of what you just copied and returns it:&lt;br /&gt;&lt;br /&gt;Put this in a bash script, give it permissions to execute:&lt;br /&gt; &lt;br /&gt;#!/bin/sh&lt;br /&gt;clipboard_contents=$(dcop klipper klipper getClipboardHistoryMenu &gt; /tmp/klippercontents; head -1 /tmp/klippercontents)&lt;br /&gt;clean_the_url=$(echo $clipboard_contents|sed 's/file:\/\/localhost//g')&lt;br /&gt;echo $clean_the_url&lt;br /&gt;&lt;br /&gt;Then go to the control panel, go to accessibility and 'input actions' and add a new keyboard shortcut.  Bind it to F6 and use the following command:&lt;br /&gt;&lt;br /&gt;bluefish `clean_bluefish_url.sh`&lt;br /&gt;&lt;br /&gt;I've been using it all the time.  It's a nice little hack.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-328131611496265994?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/328131611496265994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2010/08/mapping-events-to-function-keys-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/328131611496265994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/328131611496265994'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2010/08/mapping-events-to-function-keys-in.html' title='Cleaning a url from the klipboard and opening the file.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-7143737301102890956</id><published>2010-07-26T09:26:00.000-07:00</published><updated>2010-08-18T09:11:04.567-07:00</updated><title type='text'>Burnout, how to recover.</title><content type='html'>Eric's short and skinny list on what you are doing to cause burnout in yourself and how to modify/remedy those behaviors&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Here is what you do wrong:&lt;/span&gt;&lt;br /&gt;    1.  You feel that you have too much responsibility, and your worth is determined by the productivity of others or the goodness of some process, you perceive them/it as being low-quality and measure your self-worth from that. &lt;br /&gt;&lt;br /&gt;    2.  You do not feel that you are sufficiently appreciated for what you do on a day-to-day basis, you perceive that someone might appreciate you, but they don't.&lt;br /&gt;&lt;br /&gt;    3.  You measure your self-worth by how many useful productive items you can cram into your day.&lt;br /&gt;&lt;br /&gt;    4.  You can't stand it when people question your capability or intelligence, regardless of how high your capability/intelligence is.&lt;br /&gt;&lt;br /&gt;    5.  You are working 60 hours a week or more, work defined as focused goal setting, focused effort, breaking down barriers to progress, mental labor that you perceive as boring or a waste of time.&lt;br /&gt;&lt;br /&gt;    6.  Your entire life is defined by your job, your experiences outside the office are small in comparison.&lt;br /&gt;&lt;br /&gt;    7.  There are cots in your office, and people routinely pull all-nighters/all-weekend/no vacation work.  You wake up to work, you stop only to eat and sleep.&lt;br /&gt;&lt;br /&gt;    8.  You find yourself thinking about the other people/processes/events that are causing your productivity to drop (an incorrect understanding of problem).  &lt;br /&gt;&lt;br /&gt;    9.  You get mad or angry that someone is saying you are spending too much time working (especially when you are).&lt;br /&gt;&lt;br /&gt;    10.  You think friends, hobbies, useless playing, relationships, games, exercise, and pointless distractions are a complete waste of time.&lt;br /&gt;&lt;br /&gt;    11.  You think the other co-workers are out to get you, and you start getting conspiracy theories going.&lt;br /&gt;&lt;br /&gt;    12.  You think your co workers have lesser value because they don't produce as much as you do.&lt;br /&gt;&lt;br /&gt;    13.  If you are using more and more aggressive behavior to micromanage or control other people's behavior.&lt;br /&gt;&lt;br /&gt;    14.  You are using chemicals to optimize your productivity during the day:  Caffeine, chocolate, cocoa, cocaine, soda, sweets, 5 hour power, monster, expresso, etc.&lt;br /&gt;&lt;br /&gt;    15.  Your told that you may be suffering from burnout, and you get defensive and find 27 reasons why you are not suffering burnout.&lt;br /&gt;&lt;br /&gt;    16.  You are feeling depressed.&lt;br /&gt;&lt;br /&gt;    17.  You are feeling a great void in your life, and life seems meaningless, you become fatalist, life is not more valuable than non living material, nothing matters, some alien could squish us like the bug we just stomped and it would be no different.&lt;br /&gt;&lt;br /&gt;    18.  You show up to work, and sit down, but nothing important happens, only meaningless stuff gets shuffled around.&lt;br /&gt;&lt;br /&gt;    19.  If you show up to work and feel that your time is being wasted doing this thing.&lt;br /&gt;&lt;br /&gt;    20.  You are not sleeping enough, you set your alarm clock to get by with as little sleep as possible.  You wake up really hard.  You disrupted and deprived the brain's of its desired number and depth of cycles of sleep.&lt;br /&gt;&lt;br /&gt;    21.  You think emotions are a useless appendage of the human mind, you think it would be better if everyone made decisions based on cost-benefit analysis, logic and reason.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;Eric's short and skinny list; How to remedy your burnout:&lt;/span&gt;&lt;br /&gt;    1.  You feel the work you do is meaningless, stop that work and write down what work would excite you, write down what you want written on your tombstone.  Change the work you do so that it works toward something that is filled with meaning and something you care about.&lt;br /&gt;&lt;br /&gt;    2.  Your taking caffeine or sugar or sodas and uppers to increase your productivity.  STOP taking those uppers, cold turkey.  When you get the munchies eat fruit/vegetables and water.&lt;br /&gt;&lt;br /&gt;    3.  Your taking high octane drugs/alcohol to calm yourself or work yourself up.  Cut that out.  Alcohol and drugs make the problem worse.&lt;br /&gt;&lt;br /&gt;    4.  You don't feel appreciated, DO NOT work harder to become appreciated, that is the burnout feedback loop.  Work to get praise back as a daily requirement.  When all that fails, change your job description/bosses/career/work.  When that fails, find your passion with other work.&lt;br /&gt;&lt;br /&gt;    5.  You measure your self-worth by how many productive items are in your day.  STOP that.  Measure your self worth by the number of high-fives you give or your overall health, and set aside 2 hours every day for joining your fitness step aerobics class.&lt;br /&gt;&lt;br /&gt;    6.  You can't stand it when people question your capability.  Learn how to shrug it off and say: "Not everyone can be the best performer".  And accept their murmurs of your lack of intelligence/capability as totally expected and something to ignore.&lt;br /&gt;&lt;br /&gt;    7.  You are working 60+ hours a week, stop that. Workweeks are 40 hours for a strong reason.  On the 40 hours you are not working, do something that cannot be called work by intelligent people.&lt;br /&gt;&lt;br /&gt;    8.  Your entire life is defined by your job, cut out that belief.  Your life is now defined by: family cohesion, friends/support group, health/wellness, overall happiness, things other than your work.  Stop asking people at parties: "what do you do?".  Ask them "What do you think about".&lt;br /&gt;&lt;br /&gt;    9.  You blame other people/processes for your lack of productivity.  Move the blame back to yourself and your irresponsible management of your mind. Your lack of productivity is because you screwed up somewhere.&lt;br /&gt;&lt;br /&gt;    10.  You think friends, hobbies, useless playing, relationships, games, exercise, and pointless distractions are a waste of time, they are not, it is time best spent.&lt;br /&gt;&lt;br /&gt;    11.  You think co-workers are out to get you, if it is real, then you can acquire evidence and thus proof and send it to HR, if you can't create an iron-clad case with proof, lose the conspiracy theories.&lt;br /&gt;&lt;br /&gt;    12.  You think your co workers have lesser value for being less productive.  NOT true.  The less productive employees are terrific, celebrate them every week with a "average employee appreciation day".  Treat them with the respect you would give a CEO, and plastic toys from think geek.&lt;br /&gt;&lt;br /&gt;    13.  Stop working on doing a better job, and start working on LOOKING like your doing a better job.  Drum up some sustainable routine celebrations for the great things that already are working.  Your burning out because nobody is recognizing what work you ARE doing.&lt;br /&gt;&lt;br /&gt;    14.  Work less on making the wiring underneath better and make the presentation better.  Everyone is going to attempt to take responsibility for creating the "oohs and aahs".  Make sure the recognition comes back to YOU.  Don't let people steal the recognition for your work.  Burnout comes from being deprived of that appreciation.&lt;br /&gt;&lt;br /&gt;    15.  You have too much responsibility, get LESS responsibility.  Make it so that the performance of other humans does not reflect on your performance.&lt;br /&gt;&lt;br /&gt;    16.  If your self worth is determined by how many molecules you shuffle around in a certain way, you'll always be unhappy because there is always more work to do.  Derive your self worth from something immovable.  One way to do this is to believe that we are fish in a fishtank, and our worth is determined by the fact that the fish-tank still exists and serves a higher purpose.  The glory/shame of everything that happens belongs to that, not you.&lt;br /&gt;&lt;br /&gt;    17.  You are letting your health fall behind, spend a few hours a day set aside for exercising and healthy living.  Your self worth is not determined by your work, it IS determined by your emotional/mental/physical health.&lt;br /&gt;&lt;br /&gt;    18.  Take your alarm clock and throw it out the window, become an early bird and go to bed by 9PM and wake up early, leaving plenty of time to get ready. Spend 2 months waking up when you naturally feel like waking up.  Don't let the alarm clock disturb your sleep cycles.  If you can't do that, give yourself at least 9 solid hours of sleep per night.  If you can't do that, then continue enjoying the symptoms of burnout.&lt;br /&gt;&lt;br /&gt;    19.  You think emotions are useless.  You may be right, but you must still express them, read them in other people, react to them, and manage them.  The belief that emotions are a waste of energy will cause critical meters and gauges in your mind to stop measuring and gauging. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You got to burnout by putting your emotional/mental/physical health on the back burner.  Put it back as the most important thing you wake up to do.&lt;br /&gt;&lt;br /&gt;Good luck, this process will take a year.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;If you ignore everything in this list:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;OK so you ignored everything in this list.  Powered through it, here is what to expect as advanced symptoms of burnout:&lt;br /&gt;&lt;br /&gt;1.  You will sit down on your computer, and your conscious mind tells the rest of your brain to start performing a work item.  You know what to do, you know how to do it, you can think of a series of sub-actions to perform the task, but work will not even begin.  A task such as double clicking a certain icon becomes mysteriously difficult, as if your mind is resisting you.&lt;br /&gt;&lt;br /&gt;2.  Incredible loss of motivation, you could be looking at the source code for the fountain of youth, and you'll fire up your browser to play games and do other time wasting activities.  Even though you want to investigate it more.&lt;br /&gt;&lt;br /&gt;3.  Your circadian rhythms will start moving around, you will experiment with abnormal sleeping patterns, 30 hours days, 4 hour naps during the day, 2 hours awake two hours asleep.  This is not healthy unless you have consulted a sleep specialist.&lt;br /&gt;&lt;br /&gt;4.  Mental errors/illness, you will start making scary lapses of judgment, logic errors and fundamental mistakes will become more frequent, you will become delusional, for example finding the link between terrorist behavior and global warming, and having reasons for believing that.&lt;br /&gt;&lt;br /&gt;5.  Thoughts of suicide, putting together a 50 item list on why it is better to not be alive than to be burdened with the task of living. &lt;br /&gt;&lt;br /&gt;6.  Cynicism in overdrive.  You will start evaluating people only in terms of their faults and failures, governing change based only on what they have done wrong.  Good things done are ignored.&lt;br /&gt;&lt;br /&gt;7.  You will become ANGRY.  More than the regular kind of angry, you'll pound the keyboard, yell on the phone, write emails while snarling and become passive aggressive.  You will become angry at little things you normally would deal with easily.  &lt;br /&gt;&lt;br /&gt;8.  You will damage your relationships with family and friends.  Leaving you alone in your crystal fortress whom nobody cares about.  The computer will not satisfy your every need.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Take it from someone who saw all this play out in a super-achiever over the course of 2-3 years.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-7143737301102890956?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/7143737301102890956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2010/07/burnout-how-to-recover.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/7143737301102890956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/7143737301102890956'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2010/07/burnout-how-to-recover.html' title='Burnout, how to recover.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-4203702709832721620</id><published>2010-07-23T08:15:00.000-07:00</published><updated>2010-07-23T11:06:24.573-07:00</updated><title type='text'>Build an Hello World SWT application tutorial.</title><content type='html'>I wrote this tutorial for all who want to build a hello world GUI application with the Standard Widget Toolkit.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://machinesentience.com/screenshot_walkthrough_java_application_using_the_standard_widget_toolkit.html"&gt;screenshot_walkthrough_java_application_using_the_standard_widget_toolkit.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-4203702709832721620?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/4203702709832721620/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2010/07/build-hello-world-swt-application.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/4203702709832721620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/4203702709832721620'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2010/07/build-hello-world-swt-application.html' title='Build an Hello World SWT application tutorial.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-1968596454578042694</id><published>2010-07-23T05:22:00.000-07:00</published><updated>2010-07-23T05:33:15.750-07:00</updated><title type='text'>O3D open source web API by google</title><content type='html'>I was looking through the source code for Google Chrome browser and bumped into the o3d API.  It supports 3D rendering in the browser, check out these videos:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.chromeplugins.org/chrome/o3d-api-a-new-open-source-web-api-by-google"&gt;http://www.chromeplugins.org/chrome/o3d-api-a-new-open-source-web-api-by-google&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you are able to get thousands of visitors browsing your site, you could load  those processors with rendering tasks and report them back to the server.  Then you can sell the CPU power to people who need them.  &lt;br /&gt;&lt;br /&gt;Click here for the rotating 3d box rendered in the browser:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://o3d.googlecode.com/svn/trunk/samples/simpleviewer/simpleviewer.html"&gt;http://o3d.googlecode.com/svn/trunk/samples/simpleviewer/simpleviewer.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-1968596454578042694?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/1968596454578042694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2010/07/o3d-open-source-web-api-by-google.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/1968596454578042694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/1968596454578042694'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2010/07/o3d-open-source-web-api-by-google.html' title='O3D open source web API by google'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-3919931340977860288</id><published>2010-07-21T09:19:00.000-07:00</published><updated>2010-07-21T11:25:27.792-07:00</updated><title type='text'>StackVM Virtual Machine.</title><content type='html'>Virtual machines on the browser:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://catonmat.net/blog/i-am-doing-a-startup?signup=ok"&gt;http://catonmat.net/blog/i-am-doing-a-startup?signup=ok&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://news.ycombinator.com/item?id=1534973"&gt;http://news.ycombinator.com/item?id=1534973&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;StackVM running from within StackVM:&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=EKFjJ9m_P8Y"&gt;http://www.youtube.com/watch?v=EKFjJ9m_P8Y&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-3919931340977860288?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/3919931340977860288/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2010/07/stackvm-virtual-machine.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/3919931340977860288'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/3919931340977860288'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2010/07/stackvm-virtual-machine.html' title='StackVM Virtual Machine.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-3980067705539378859</id><published>2010-07-15T07:27:00.000-07:00</published><updated>2010-07-15T07:43:24.206-07:00</updated><title type='text'>Access to human genetic information.</title><content type='html'>Hacking the codes that built your mind.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.sanger.ac.uk/resources/downloads/human/"&gt;&lt;br /&gt;http://www.sanger.ac.uk/resources/downloads/human/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Putting this on my todo list to write some apps and get my hands dirty with human DNA.&lt;br /&gt;&lt;br /&gt;Download some DNA and some DNA tools:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.genecodes.com/"&gt;http://www.genecodes.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Download some of the human genetic information here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://completegenomics.com/dataRelease/variations.aspx"&gt;http://completegenomics.com/dataRelease/variations.aspx&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-3980067705539378859?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/3980067705539378859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2010/07/access-to-human-genetic-information.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/3980067705539378859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/3980067705539378859'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2010/07/access-to-human-genetic-information.html' title='Access to human genetic information.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-403368033282847504</id><published>2010-07-14T07:53:00.000-07:00</published><updated>2010-07-14T08:30:55.389-07:00</updated><title type='text'>Professor Messer</title><content type='html'>Epic Video Lectures on computer hardware and software inside and out.&lt;br /&gt;&lt;br /&gt;ProfessorMesser Comptia video lectures:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.professormesser.com/free-a-plus-training/220-701/professor-messers-free-220-70x-comptia-a-training-course"&gt;http://www.professormesser.com/free-a-plus-training/220-701/professor-messers-free-220-70x-comptia-a-training-course&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-403368033282847504?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/403368033282847504/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2010/07/compiz-for-linux.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/403368033282847504'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/403368033282847504'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2010/07/compiz-for-linux.html' title='Professor Messer'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-7148210404676654076</id><published>2010-06-17T12:06:00.000-07:00</published><updated>2010-06-17T12:53:48.540-07:00</updated><title type='text'>Predictive analytics</title><content type='html'>Predictive Analytics, the ability to correctly predict the future with enough accuracy to be useful.&lt;br /&gt;&lt;br /&gt;Essentially, learning is 'predictive analytics'.  "Learning to drive a car" is really predicting the future of what will happen when you manipulate a control.&lt;br /&gt;&lt;br /&gt;Here some eggheads at Yale talk about how Insurance houses do their own form of predictive analytics to manage risk and maximize profit:&lt;br /&gt;&lt;a href=" http://academicearth.org/lectures/real-estate-finance"&gt;http://academicearth.org/lectures/real-estate-finance&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Check out IBM's Watson, solves jeopardy questions faster than some top contestants, it uses predictive analytics to determine the probability of a correct answer to a jeopardy question:&lt;br /&gt;&lt;a href="http://www.nytimes.com/2010/06/20/magazine/20Computer-t.html?hp"&gt;http://www.nytimes.com/2010/06/20/magazine/20Computer-t.html?hp&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Tutorials on Data Mining, Probability, and decision trees, cousins of Predictive analytics:&lt;br /&gt;&lt;a href="http://www.autonlab.org/tutorials/"&gt;http://www.autonlab.org/tutorials/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Better than Grandmaster Chess algorithms are a form of predictive modeling that beat out humans:&lt;br /&gt;&lt;a href="http://www.research.ibm.com/deepblue/home/html/b.shtml"&gt;http://www.research.ibm.com/deepblue/home/html/b.shtml&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.shredderchess.com/play-chess-online.html"&gt;http://www.shredderchess.com/play-chess-online.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Introspection robot:&lt;br /&gt;&lt;a href="http://www.technovelgy.com/ct/Science-Fiction-News.asp?NewsNum=823"&gt;http://www.technovelgy.com/ct/Science-Fiction-News.asp?NewsNum=823&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Predictive Analytics World 2010 - The New Data Economy featuring Andreas Weigend &lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=l9NsJXiLhEM&amp;feature=related"&gt;http://www.youtube.com/watch?v=l9NsJXiLhEM&amp;feature=related&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-7148210404676654076?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/7148210404676654076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2010/06/predictive-analytics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/7148210404676654076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/7148210404676654076'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2010/06/predictive-analytics.html' title='Predictive analytics'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-9221040049323277145</id><published>2009-11-07T15:36:00.000-08:00</published><updated>2009-11-07T16:13:55.361-08:00</updated><title type='text'>Installing the WAMP stack on Windows XP.</title><content type='html'>For all of you interested in setting up the WAMP stack.  I've created a step-by-step newbie guide on how to do it.  &lt;br /&gt;&lt;br /&gt;&lt;a href="http://machinesentience.com/eric_leschinski_resume/ProgrammingWork/installing_and_configuring_wamp_stack.html"&gt;http://machinesentience.com/eric_leschinski_resume/ProgrammingWork/installing_and_configuring_wamp_stack.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Go forth, wannabees, and make John Carmack, Jack Dorsey and Rob Mallda Proud!  Riches beyond measure are there for the taking.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-9221040049323277145?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/9221040049323277145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2009/11/installing-wamp-stack-on-windows-xp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/9221040049323277145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/9221040049323277145'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2009/11/installing-wamp-stack-on-windows-xp.html' title='Installing the WAMP stack on Windows XP.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-4941482926700560261</id><published>2009-10-31T15:38:00.001-07:00</published><updated>2010-02-25T12:17:17.548-08:00</updated><title type='text'>Visual as Audio.</title><content type='html'>So I bought this Samsung Netbook NC10 netbook right, Got it for $388:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_t5IisUgM8Ro/Suy83toj5qI/AAAAAAAAAEg/-b6gl2I6IGE/s1600-h/samsung_netbook_unwrapping04.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 352px;" src="http://4.bp.blogspot.com/_t5IisUgM8Ro/Suy83toj5qI/AAAAAAAAAEg/-b6gl2I6IGE/s400/samsung_netbook_unwrapping04.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5398897718638929570" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Then I put this software onto it:&lt;br /&gt;&lt;a href="http://www.seeingwithsound.com/"&gt;http://www.seeingwithsound.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then I put in my stereo Headphones into it.&lt;br /&gt;&lt;br /&gt;Then I took my web cam and duct taped it to the dumbest looking hat I could find.&lt;br /&gt;&lt;br /&gt;Plugged in the web Cam.&lt;br /&gt;&lt;br /&gt;I put the laptop into a backpack (make sure it's well ventilated and constantly check for overheating) and put duct tape over my eyes and walk around my house for 4 hours bumping into stuff, picking things up, tilting my head like a dog, discovering what objects sound like through this software.&lt;br /&gt;&lt;br /&gt;You know those lights you get when you press on your eyes?  After 4 hours of practice (with the help of a big dose of caffeine and a hard headed determination and intention to succeed) those light fireworks were starting to correspond to the contours in the room.  I was able to hear the locations of various objects in my house.&lt;br /&gt;&lt;br /&gt;The grass outside sounds like dropping rice on the floor.  The larger the grass it sounds more like a waterfall.  Looking at the keyboard adds a tapping like sound.  Looking at a wall of uniform color sounds like the wind.  Circles, Squares, triangles all have their own unique sound.  The hard part is linking which one is which.  &lt;br /&gt;&lt;br /&gt;I could walk across the room, spin around to get dizzy, reorient myself with only data from the audio, and pinpoint contours in color to within a few inches.  However I could not actually figure out what the contour was.  The theory goes if you immerse yourself in this you can see depth.  &lt;br /&gt;&lt;br /&gt;So in conclusion, yes, the Broca's area and Wernecke's area of the left hemisphere of my brain either processes the sound itself as visual data and passes it up to my consciousness.  Or it patches the data through to the Visual Cortex for processing.  An interesting idea.&lt;br /&gt;&lt;br /&gt;I plan on practicing a little bit every day for a while to see how good I can use it.  Then the sky is the limit, infrared, wide band radar.  Seeing around corners, seeing through walls.  This could be huge.  We are Borg, your unique properties will be assimilated.  &lt;br /&gt;&lt;br /&gt;We are indeed machines.  Firefighters could probably use this.  Swap out the information gathered to lidar, radar, sonar or infrared.  Probably should keep these ideas quiet.  Probably make a million to champion these ideas and bring a product to wal-mart.&lt;br /&gt;&lt;br /&gt;I got this entire setup for under $500.  Email me if you want to know more about this.  I can get you setup and bumping into stuff in under a week.  eric.leschinski@hotmail.com&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-4941482926700560261?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/4941482926700560261/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2009/10/bring-sight-to-blind-man-with-software.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/4941482926700560261'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/4941482926700560261'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2009/10/bring-sight-to-blind-man-with-software.html' title='Visual as Audio.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_t5IisUgM8Ro/Suy83toj5qI/AAAAAAAAAEg/-b6gl2I6IGE/s72-c/samsung_netbook_unwrapping04.jpg' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-8089126994649108650</id><published>2009-10-20T12:28:00.000-07:00</published><updated>2009-10-20T12:31:17.053-07:00</updated><title type='text'>Infinite Mario Brothers refactoring.</title><content type='html'>I just got done decompiling / recompiling Infinite Mario Brothers from source and served it up on my webspace:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://machinesentience.com/infinite_mario_brothers_applet.html"&gt;http://machinesentience.com/infinite_mario_brothers_applet.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I'm quite proud I got it up and working, now I can start fooling around with the source and see if I can get some kind of AI to happen.  &lt;br /&gt;&lt;br /&gt;Throwing in my lot with the programming greats.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-8089126994649108650?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/8089126994649108650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2009/10/infinite-mario-brothers-refactoring.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/8089126994649108650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/8089126994649108650'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2009/10/infinite-mario-brothers-refactoring.html' title='Infinite Mario Brothers refactoring.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-2225121584682435806</id><published>2009-09-30T07:38:00.000-07:00</published><updated>2010-06-13T06:21:23.921-07:00</updated><title type='text'>L11 Inference.</title><content type='html'>In this lesson I'm going to talk about inference.&lt;br /&gt;&lt;br /&gt;Good to review what inference is:&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Inference"&gt;http://en.wikipedia.org/wiki/Inference&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;First read the above wikipedia page, if it hurts your brain, good, that means it's working.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Lets suppose you have a headache, lets calculate the odds you have the flu by inference, Simple Version: click to enlarge.&lt;/b&gt;&lt;br /&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt;&lt;a href="http://machinesentience.com/eric_leschinski/bayes_rule_01.jpg"&gt;&lt;img src="http://machinesentience.com/eric_leschinski/bayes_rule_01.jpg" width="340" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Ok Got that?  Those are baby numbers to make the calculations easy.  Now lets calculate the odds you have the flu by inference with real world data.  Advanced version, click to enlarge.&lt;/b&gt;&lt;br /&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt;&lt;a href="http://machinesentience.com/eric_leschinski/bayes_rule_02.jpg"&gt;&lt;img src="http://machinesentience.com/eric_leschinski/bayes_rule_02.jpg" width="340" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:78%;"&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Text from the above pictures:&lt;/span&gt;&lt;br /&gt;F = Probability a person has the flu.&lt;br /&gt;H = Probability a person has a headache.&lt;br /&gt;A = Those with the flu and no headache.&lt;br /&gt;C = Those with headache but no flu.&lt;br /&gt;&lt;br /&gt;A = 6&lt;br /&gt;B = 3&lt;br /&gt;C = 35&lt;br /&gt;F = (A + B) = 9&lt;br /&gt;H = (B + C) = 38&lt;br /&gt;&lt;br /&gt;P = Probability function.&lt;br /&gt;&lt;br /&gt;P(H | F) = If you have a flu, how likely is it you have a headache?&lt;br /&gt;P(F | H) = If you have a headache, how likely is it you have the flu?&lt;br /&gt;&lt;br /&gt;P(H | F) = B / (A+B) = 3 / 9 = 33.33% chance.&lt;br /&gt;P(F | H) = B / (B+C) = 3 / 38 = 7.89% chance.&lt;br /&gt;&lt;br /&gt;1.  Data Input&lt;br /&gt;One out of 90 people have the flu.&lt;br /&gt;One out of 40 people have a headache.&lt;br /&gt;Of the people who have headaches, 1 in 60 had the flu.&lt;br /&gt;&lt;br /&gt;2.  Draw this graph&lt;br /&gt;&lt;br /&gt;3.  Link Graph to Data.&lt;br /&gt;F = (A + B) = 1/90 = .01111&lt;br /&gt;H = (B + C) = 1/40 = .025&lt;br /&gt;B = H * (1/60) = .025*.016667 = .000416&lt;br /&gt;&lt;br /&gt;4.  Do highschool algebra to get missing values.&lt;br /&gt;Find A:&lt;br /&gt;F = (A + B)&lt;br /&gt;.01111 = A + .0004167&lt;br /&gt;.01111 - .0004167 = A&lt;br /&gt;.01096 = A&lt;br /&gt;&lt;br /&gt;5.  Gather up the values for each box.&lt;br /&gt;&lt;br /&gt;A = .01096&lt;br /&gt;B = .0004167&lt;br /&gt;F = .01111&lt;br /&gt;H = .025&lt;br /&gt;C = H - B&lt;br /&gt;C = .025 - .0004167 = .0245833&lt;br /&gt;&lt;br /&gt;6.  Apply the probabilistic Inference Equation:&lt;br /&gt;P(H | F) = B / (A+B) = B / F = .0004167 / .01111 = .03750&lt;br /&gt;This means if you have the flue, there is a 3.75% chance you have a headache.&lt;br /&gt;&lt;br /&gt;P(F | H) = B / (B+C) = B / H = .0004167 / .025 = .01667&lt;br /&gt;This means if you have a headache there is a 1.667% chance you have the flu.&lt;br /&gt;&lt;br /&gt;You might be wondering "you could get there a lot easier by just taking the "one in 60 had the flue" and then calculate 1 / 60 to get .01667.&lt;br /&gt;&lt;br /&gt;But in doing out the probabilistic Inference Equation you are able to calculate what percentage of people who have flus get headaches when all you have is data on how many people with headaches get flus.&lt;br /&gt;&lt;br /&gt;To code machine intelligence, we will have to get a thorough understanding of how to get computers to "get it" like humans get this intuitively.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;With this skill, you can find out the probability that you have the flu based on the knowledge you have a headache when all you know for certain is what percentage of flu sufferers had headaches.  Humans have algorithms inside our heads that do this automatically, and here is the mathematical representation of the software in your head.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-2225121584682435806?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/2225121584682435806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2009/09/l11-inference.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/2225121584682435806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/2225121584682435806'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2009/09/l11-inference.html' title='L11 Inference.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-7904831228409942397</id><published>2009-08-30T08:43:00.000-07:00</published><updated>2009-09-01T16:14:50.234-07:00</updated><title type='text'>L10 solving games with AI.</title><content type='html'>In this lesson we will review what has been done and is going on in the AI community.&lt;br /&gt;&lt;br /&gt;So there is this java based video game called "Infinite mario bros".  It has an infinite amount of levels and scenes to play with varying difficulty.  If you want to just play it, here it is.  &lt;a href="http://www.mojang.com/notch/mario/"&gt;http://www.mojang.com/notch/mario/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If the above link is unavailable you might find another with a google search "Play Infinite Mario Bros java".&lt;br /&gt;&lt;br /&gt;Infinite Mario Bros controlled by AI:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_t5IisUgM8Ro/So2DeDmwwvI/AAAAAAAAACw/SNIkJYWDElQ/s1600-h/super_mario_brothers_ai.jpg"&gt;&lt;img style="cursor:pointer; cursor:hand;width: 320px; height: 241px;" src="http://4.bp.blogspot.com/_t5IisUgM8Ro/So2DeDmwwvI/AAAAAAAAACw/SNIkJYWDElQ/s400/super_mario_brothers_ai.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5372094482910069490" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Sergey Karakovskiy and Julian Togelius setup this competition to optimize playing this video game for time to completion.  The details are here: &lt;a href="http://julian.togelius.com/mariocompetition2009"&gt;http://julian.togelius.com/mariocompetition2009&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There is this Google group discussing the details of the competition:&lt;br /&gt;&lt;a href="http://groups.google.com/group/mariocompetition"&gt;http://groups.google.com/group/mariocompetition&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I saw this java application built by Robin Baumgarten and I was humbled:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.acceleratingfuture.com/michael/blog/2009/08/friendly-ai-supporter-solves-super-mario"&gt;http://www.acceleratingfuture.com/michael/blog/2009/08/friendly-ai-supporter-solves-super-mario&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Robin Baumgarten, author of &lt;a href="http://aipanic.com"&gt;http://aipanic.com&lt;/a&gt; seems to have written a successful script or program capable of navigating complex dangerous scenes with ease.&lt;br /&gt;&lt;br /&gt;His Mario makes a number of mistakes where it seems not to choose the best movement.  This leads me to believe that it's short sighted and works itself into corners or else it is a true learning machine and is just making mistakes trying out new things.  I wish I could get his source so I can dissect.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Another contestant:&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=BD4_6ZRrDFk"&gt;http://www.youtube.com/watch?v=BD4_6ZRrDFk&lt;/a&gt;&lt;br /&gt;and&lt;br /&gt;&lt;a href="http://www.youtube.com/watch?v=NmpIEbiRyCU&amp;fmt=22"&gt;http://www.youtube.com/watch?v=NmpIEbiRyCU&amp;fmt=22&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I'll be watching this contest and trying to snag some source code if it presents itself so we can see what strategies they are using.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-7904831228409942397?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/7904831228409942397/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2009/08/l09-solving-games-with-ai.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/7904831228409942397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/7904831228409942397'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2009/08/l09-solving-games-with-ai.html' title='L10 solving games with AI.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_t5IisUgM8Ro/So2DeDmwwvI/AAAAAAAAACw/SNIkJYWDElQ/s72-c/super_mario_brothers_ai.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-1989508857448484221</id><published>2009-08-25T09:16:00.001-07:00</published><updated>2009-10-14T08:23:31.628-07:00</updated><title type='text'>L09 Whence cometh a sequence java app.</title><content type='html'>In this lesson we analyze my attempt at creating a facet of scalable machine sentience.  &lt;br /&gt;&lt;br /&gt;Look at this java code.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://machinesentience.com/eric_leschinski_resume/ProgrammingWork/machine_learning_pattern_guessing/Runner.java"&gt;http://mainecode.com/sentientmachine/ProgrammingWork/machine_learning_pattern_guessing/Runner.java&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I coded this up in about an hour, it's nothing too special.  It's not that smart.  It just implements what I discussed in the previous lesson L08.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-1989508857448484221?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/1989508857448484221/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2009/08/l09-whence-cometh-sequence-java-app.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/1989508857448484221'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/1989508857448484221'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2009/08/l09-whence-cometh-sequence-java-app.html' title='L09 Whence cometh a sequence java app.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-7144020101652000758</id><published>2009-08-07T17:04:00.000-07:00</published><updated>2009-08-25T09:15:13.452-07:00</updated><title type='text'>L08 Whence cometh a sequence?</title><content type='html'>In this lesson we look at a few patterns.  A reasonably college educated human could figure out what mathematical formula caused these patterns.  We explore what it might mean if software could get at the root of every kind of mathematically generated pattern.  In the next lesson I'll show you a java program I whipped up to implement what I'm describing.&lt;br /&gt;&lt;br /&gt;This idea comes from Douglas Hofstadter's book Fluid Concepts and Creative Analogies.  &lt;br /&gt;link: &lt;a href="http://books.google.com/books?id=somvbmHCaOEC&amp;lpg=PP1&amp;ots=oiCRgrQN1L&amp;dq=douglas%20hofstadter%20fluid%20analogies&amp;pg=PP1#v=onepage&amp;q=&amp;f=false"&gt;http://books.google.com/books?id=somvbmHCaOEC&amp;lpg=PP1&amp;ots=oiCRgrQN1L&amp;dq=douglas%20hofstadter%20fluid%20analogies&amp;pg=PP1#v=onepage&amp;q=&amp;f=false&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Buy the book, he really conveys the depth of this strategy of building computer sentience in software.&lt;br /&gt;&lt;br /&gt;In the first chapter: "To seek whence cometh a sequence" Douglas Hofstadter provides four sequences:&lt;br /&gt;&lt;br /&gt;1,3,6,10,15,21,28,36,45,55,66,78,91, ...&lt;br /&gt;1,4,9,16,25,36,49,64,81,100,121, ...&lt;br /&gt;1,1,3,4,6,9,10,15,16,21,25,28,36, ...&lt;br /&gt;2,1,2,1,1&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The first pattern is the sum of all integers up to the index of the position, so position 5 = 1+2+3+4+5 = 15&lt;br /&gt;&lt;br /&gt;The second pattern is the sum of all odd integers up to the index of the position, so position 5 = 1+3+5+7+9 = 25&lt;br /&gt;&lt;br /&gt;The third pattern is patterns 1 and 2 spliced together, put into order.&lt;br /&gt;&lt;br /&gt;The fourth pattern is the count of (pattern 1 objects) situated between the (pattern 2 objects).  &lt;br /&gt;&lt;br /&gt;He did this because the pattern 2,1,2,1,1 seems to have a chaotic progression to it when he calculated it out:&lt;br /&gt;&lt;br /&gt;2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2,1,2,1,2,1,1,2,1,2,1,1,2&lt;br /&gt;&lt;br /&gt;He wanted to find the simplest rule that governed the seemingly simple progression of 1's and 2's.  The majority of the chapter is devoted to his strategies of how he went about trying to figure out whence cometh that sequence.&lt;br /&gt;&lt;br /&gt;Later in the chapter, he provides 20 other complex sequences like this.  Douglas said that if one could create an algorithm that would deduce where all those sequences came from as well as every conceivable pattern within the infinite set of mathematically generated patterns, then it would be sentient just as we regard college educated humans as sentient (in the area of mathematical pattern recognition). &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;One strategy he raised for building a program that would accomplish this is to simplify a pattern by applying modifiers to it.  For example, take this mysterious pattern:&lt;br /&gt;&lt;br /&gt;1,4,9,16,25,36,49,64,81,100,...&lt;br /&gt;&lt;br /&gt;The more perceptive of you already know what this sequence is.  For our purposes, all you need to know is that we have a list of numbers, and we want the next one in the sequence.  &lt;br /&gt;&lt;br /&gt;Step 1, apply a modifier to this sequence (Take the differences between each number) and assemble it into another child sequence:&lt;br /&gt;&lt;br /&gt;3,5,7,9,11,13,15,17,19, ...&lt;br /&gt;&lt;br /&gt;Humans and computers can simply look at this pattern and deduce what comes next.  But suppose we still don't see it?  Step 2, run the same modifier on it again!&lt;br /&gt;&lt;br /&gt;2,2,2,2,2,2,2,2,...&lt;br /&gt;&lt;br /&gt;The pattern is strong with this one, humans and computers can easily predict the next number in the sequence.  It's "2".  &lt;br /&gt;&lt;br /&gt;So with this knowledge of the next number in the sequence, percolate that up to the original sequence, and thus, you have your next number. (It is the sum of all odd integers up to the index of the position  position 5 = 1+3+5+7+9 = 25).  &lt;br /&gt;&lt;br /&gt;Douglass says this method sounds promising because each new learned sequence could be entered into the knowledge base of "known sequences".  That would enable it to quickly get at the source of some very complex patterns.  But the computer is not thinking as a human does.  Humans attach ideas to individual numbers and groups/sets/oscillations of numbers.  Humans notice that a '25' can be seen as a (5 * 5).  This algorithm above does none of that.&lt;br /&gt;&lt;br /&gt;The main problem with this strategy is that trying all the possibilities will require too much time and energy.  If the software is to find the root of a complex pattern, it must have a massive amount of modifiers in it's library.  It will also need a clever depth first strategy or else it will too long searching the infinite search space.   &lt;br /&gt;&lt;br /&gt;Thus machine is cursed with the same curse of man if it is to become sentient: You can't search infinity, so you better do the best you can with what you have.&lt;br /&gt;&lt;br /&gt;In the next lesson I'll show you my best attempt to write this program.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-7144020101652000758?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/7144020101652000758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2009/08/l08-whence-cometh-sequence.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/7144020101652000758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/7144020101652000758'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2009/08/l08-whence-cometh-sequence.html' title='L08 Whence cometh a sequence?'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-2781181425140667328</id><published>2009-07-28T06:45:00.000-07:00</published><updated>2010-08-06T09:33:21.093-07:00</updated><title type='text'>L07 Java learns a perfect game of tic-tac-toe.</title><content type='html'>In the previous lesson we talked about the principle of how to use statistics, memory and rules to create an algorithm that can learn to play a perfect game of tic-tac-toe.  Lets code it in java.&lt;br /&gt;&lt;br /&gt;I coded up a java application last night in 2-4 hours that illustrates two learning algorithms playing tic-tac-toe against each other thousands of times and learning to play a perfect game far faster than any child or adult human could.&lt;br /&gt;&lt;br /&gt;See the java code here:&lt;br /&gt;&lt;a href="http://machinesentience.com/java_machine_learning_example.html"&gt;http://machinesentience.com/java_machine_learning_example.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Board index positions:&lt;/b&gt;&lt;br /&gt; &lt;pre&gt; 0 | 1 | 2     &lt;br /&gt;-----------&lt;br /&gt; 3 | 4 | 5 &lt;br /&gt;-----------&lt;br /&gt; 6 | 7 | 8&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A normal boring state&lt;/b&gt; &lt;br /&gt;Below is a state for player1.  X is to move.  See cupContents below, it's contents were determined after 4000 games.  '2' represents board index position 2 seen above.    X has learned that 2 is a win and 5 is a loss, thus there are more '2' than '5'.&lt;br /&gt;&lt;pre&gt; X | X |  &lt;br /&gt;---|---|---&lt;br /&gt; O | O |  &lt;br /&gt;---|---|---&lt;br /&gt; X | O | O&lt;br /&gt;cupContents:  '2222222222522222222'&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Another state:&lt;/b&gt;&lt;br /&gt;Here is where the my learning algorithm surprised me, it understands it's own "guess and learn" mentality and chooses a situation that forces a board win over an immediate win.  Consider the following state:&lt;br /&gt;&lt;pre&gt; X |   | O&lt;br /&gt;---|---|---&lt;br /&gt;   | X | X&lt;br /&gt;---|---|---&lt;br /&gt; O |   | O&lt;br /&gt;cupContents:  &lt;br /&gt;'11333333333377777777773333333377&lt;br /&gt;777777777777777777777777777777'&lt;/pre&gt;Above: X to move. To move to position 1 is dumb, 1 is small, that's as I expect.  7 is the most likely choice and 3 second most likely.  Why is 7 a more desirable play?  Position 3 is the immediate win!  Is the learning algorithm broken?  Not at all, position 7 creates the triangle formation which forces a win even when X's learning is sub-optimal.  The learning algorithm is making provision for what it knows it might not know.  Humans do the same thing, we choose a bird in the hand over 2 in the bush.  &lt;br /&gt;&lt;br /&gt;I'm putting extra emphasis on this because it is the secret sauce of learning algorithms.  It learns its own weaknesses.  We want to encourage our future algorithms to do the same kind of thing.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Another state:&lt;/b&gt;&lt;pre&gt; X |   |  &lt;br /&gt;---|---|---&lt;br /&gt;   |   | O&lt;br /&gt;---|---|---&lt;br /&gt;   | O |  &lt;br /&gt;cupContents:  &lt;br /&gt;'2344668822666666662222222288888888188888888&lt;br /&gt;66666666888888881111111122222222666666662222&lt;br /&gt;222211111111'&lt;/pre&gt;X to move.  The above state looks dangerous for X because O is about to secure the deadly triangle formation which can guarantee a win.  X notices that position 8 is pretty good because it blocks all that.  But it also notices that '2' and '6' are pretty good too, X is trying to beat O by winning faster than O can form it's O triangle.  It likes position '1' over '3' even though they are equivalent, that's just the way the game progressed.  If it played even more maybe it would discover 1 is a bad move too.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_t5IisUgM8Ro/Sm8aS6Esm9I/AAAAAAAAACg/_Gc2ogUfdeE/s1600-h/learning_algorithm_tic_tac_toe_screenshot.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_t5IisUgM8Ro/Sm8aS6Esm9I/AAAAAAAAACg/_Gc2ogUfdeE/s400/learning_algorithm_tic_tac_toe_screenshot.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5363534593350474706" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Thoughts on learning that a loss &lt; draw &lt; win&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This application is not perfect, a small change can greatly improve it, I'll let you do it if you want, consider this state:&lt;br /&gt;&lt;pre&gt;      | O |  &lt;br /&gt;   ---|---|---&lt;br /&gt;    X | O | O&lt;br /&gt;   ---|---|---&lt;br /&gt;    O | X | X&lt;br /&gt;&lt;/pre&gt; X to move.  The choices are position 2, Draw, and position 0, loss.  This Java app algorithm punishes Player1 with varying intensities for draw and loss, so the beads in the cup are reduced to the minimum and the cupContents reach the minimum and essentially results in a 50/50 pick.  That is not learning.&lt;br /&gt;&lt;br /&gt;The problem is that this algorithm has no concept of "given a choice between loss and draw, choose draw".  We see 3 choices to fix this, understand the pros and cons of each:&lt;br /&gt;&lt;br /&gt;1.  Descend down and teach it a hard and fast rule: "Given the choice between draw and loss, choose draw".  But that's just normal rules based programming and has been done millions of times before so that's a waste of our time.&lt;br /&gt;&lt;br /&gt;2.  Don't punish the player at all for drawing.  This would result in position 2 being much more likely than position 0.  However it would not accumulate that wisdom by itself, it's only working that way because that's how the programmer coded it to work, no learning occurred with that state.&lt;br /&gt;&lt;br /&gt;3.  The best fix would to reward the player a small amount for a draw, and reward it a large amount for a win.  This way, over time, the algorithm will accumulate the knowledge by itself that a draw is more desirable than a loss, and a win is more desirable than a draw.&lt;br /&gt;&lt;br /&gt;Geek out.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-2781181425140667328?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/2781181425140667328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2009/07/l07-java-code-to-learn-perfect-game-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/2781181425140667328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/2781181425140667328'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2009/07/l07-java-code-to-learn-perfect-game-of.html' title='L07 Java learns a perfect game of tic-tac-toe.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_t5IisUgM8Ro/Sm8aS6Esm9I/AAAAAAAAACg/_Gc2ogUfdeE/s72-c/learning_algorithm_tic_tac_toe_screenshot.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-2270427536530998475</id><published>2009-07-23T20:26:00.000-07:00</published><updated>2009-07-23T21:20:26.235-07:00</updated><title type='text'>L06 How to learn how to play tic-tac-toe.</title><content type='html'>In this lesson we analyze a learning algorithm that is capable of learning how to play a perfect game of tic-tac-toe on its own.&lt;br /&gt;&lt;br /&gt;I borrowed this idea from Bruce Frey's O'REILLY Book: "Statistics Hacks", Hack #52 page 216-220.  &lt;br /&gt;&lt;br /&gt;Books.google.com has a preview of the latter half of that chapter:  &lt;a href="http://books.google.com/books?id=HOPyiNb9UqwC&amp;lpg=PA209&amp;ots=T5sKtuErs6&amp;dq=statistics%20hacks%20monty%20hall%20problem&amp;pg=PA219"&gt;http://books.google.com/books?id=HOPy...&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I don't want to steal Bruce Frey's thunder (go buy the book).  But to summarize, he explains that you don't need a computer to make a learning algorithm.  The thought experiment shows that successful learning can be accomplished with statistics, memory and rules.  What you'll need is 287 cups and a large supply of beads consisting of 9 different colors.&lt;br /&gt;&lt;br /&gt;The nine colors represent each of the nine different spaces on the tic-tac-toe board.  The 287 cups represent the different configurations of X's and O's on the board.  There are far more than 287 configurations, but because the layout is a square, rotations of the board are summarized into one position.  I assume further compression could be done based on board configurations that would never occur (like a board with 5 X's and only 2 O's).&lt;br /&gt;&lt;br /&gt;So we begin teaching the learning algorithm by playing a game of tic-tac-toe.  We are 'X', the algorithm is 'O'.  The algorithm goes first, the initial state of the board is blank.   Go to your cup corresponding to that state and pull out a random bead.  Mark an 'O' on the board representing the color.  Save the bead by setting it down next to the cup it came from.  Now make your move.  Now the board will have a new state.  Choose the cup representing that state, and repeat until the game is over.&lt;br /&gt;&lt;br /&gt;If the learning algorithm wins, add more beads of the same color to the cups that lead to that victory.  If it lost, or ended in a draw, throw away the beads you collected.&lt;br /&gt;&lt;br /&gt;If you play this game thousands of times, the learning algorithm will learn to play a perfect game of tic-tac-toe and will make the move which most likely results in a win every time.&lt;br /&gt;&lt;br /&gt;Bruce Frey does the description of the problem much more justice, I suggest you take a look at it in your local borders or barns and noble.  It's in the math section.&lt;br /&gt;&lt;br /&gt;Totally impressed with the chapter, I went ahead and coded it up in Java, in the next lesson we will examine the source code that proves that this learning algorithm works and examine it's limitations.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-2270427536530998475?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/2270427536530998475/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2009/07/l06-learning-to-play-tic-tac-toe.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/2270427536530998475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/2270427536530998475'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2009/07/l06-learning-to-play-tic-tac-toe.html' title='L06 How to learn how to play tic-tac-toe.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-5106185267715108881</id><published>2009-07-17T16:59:00.000-07:00</published><updated>2009-07-17T20:43:29.990-07:00</updated><title type='text'>L05 Definitions</title><content type='html'>&lt;span style="font-weight:bold;"&gt;Decision Trees - &lt;/span&gt; &lt;a href="http://en.wikipedia.org/wiki/Decision_tree"&gt;http://en.wikipedia.org/wiki/Decision_tree&lt;/a&gt;&lt;br /&gt;A decision tree is very simple.  Wikipedia uses big words for something easy. This picture should be worth a thousand words:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_t5IisUgM8Ro/SmFEy55ZQdI/AAAAAAAAABg/5BcRTCo70nM/s1600-h/decision_tree1.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 176px;" src="http://4.bp.blogspot.com/_t5IisUgM8Ro/SmFEy55ZQdI/AAAAAAAAABg/5BcRTCo70nM/s400/decision_tree1.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5359640672873300434" /&gt;&lt;/a&gt;&lt;br /&gt;Suppose I have a piece of bread I want to sell you.  It is moldy and 60% off.  I instruct you to evaluate whether or not you want to buy my bread based on the decision tree in this image.  If you correctly follow the instructions, you will buy the bread.  We can improve this tree quite a bit by hand.  But the fun part will be teaching the computer to improve this decision tree based on collected data and observation of probabilities.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Tractable and Intractable -&lt;/span&gt; &lt;a href="http://knowledgerush.com/kr/encyclopedia/Intractable_problem/"&gt;http://knowledgerush.com/kr/encyclopedia/Intractable_problem/&lt;/a&gt;&lt;br /&gt;An intractable problem is a problem that is not easily directed, managed or governed.  A tracktable problem is a problem that is easily directed, managed or governed.  An example of an intractable problem (to me) would be an algorithm that optimizes what to say to the opposite sex to cause a certain emotion.  Exploring the entire solution tree of an intractable problem can be problamatic, and if we are not smart, we may miss the most important subtree altogether.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Cost Function - &lt;/span&gt; &lt;a href="http://economics.about.com/od/termsbeginningwithc/g/cost_function.htm"&gt;http://economics.about.com/od/termsbeginningwithc/g/cost_function.htm&lt;/a&gt;&lt;br /&gt;A function which when calculated will tell us how much the solution costs based on parameters passed in.  For example the traveling salesman problem cost function would be a sum of the distance between the cities traveled to.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Contingency Table -&lt;/span&gt; &lt;a href="http://en.wikipedia.org/wiki/Contingency_table"&gt;http://en.wikipedia.org/wiki/Contingency_table&lt;/a&gt;&lt;br /&gt;Wikipedia says it best: "A contingency table is used to record and analyse the relationship between two or more variables, most usually categorical variables."  The illustration used connects gender with handedness.  If the proportions of individuals in the different columns varies between rows (and, therefore, vice versa) we say that the table shows contingency between the two variables. If there is no contingency, we say that the two variables are independent.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Data Mining - &lt;/span&gt; &lt;a href="http://en.wikipedia.org/wiki/Data_mining"&gt;http://en.wikipedia.org/wiki/Data_mining&lt;/a&gt;&lt;br /&gt;Finding patterns in data.  For example the duration of a wire-tapped phone call measured against the average volume of the voice on the call.  Would there be a correlation between volume and length?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Information gain -&lt;/span&gt; &lt;a href="http://www.cs.cmu.edu/afs/cs/Web/People/awm/tutorials/infogain.html"&gt;http://www.cs.cmu.edu/afs/cs/Web/People/awm/tutorials/infogain.html&lt;/a&gt;&lt;br /&gt;Huge subject, saving this for another lesson, it measures how we are able to predict one variable by observing a different variable.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Overfitting -&lt;/span&gt; &lt;a href="http://en.wikipedia.org/wiki/Overfitting"&gt;http://en.wikipedia.org/wiki/Overfitting&lt;/a&gt;&lt;br /&gt;Overfitting in the field of Machine Learning is where an algorithm actively makes a connection between random data and predicted output.  The observations and stats gleaned will most likely mislead it in future tests without random data in it.  In order to avoid overfitting, it is necessary to use additional techniques (e.g. cross-validation, regularization, early stopping, Bayesian priors on parameters or model comparison), that can indicate when further training is not resulting in better generalization.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;cross-validation -&lt;/span&gt; &lt;a href="http://en.wikipedia.org/wiki/Cross-validation_(statistics)"&gt;http://en.wikipedia.org/wiki/Cross-validation_(statistics)&lt;/a&gt;&lt;br /&gt;A great way to eliminate invalid test hypothesis suggested by the data.  What you do is take your original testing set and split it into multiple sub-test sets.  Training the learning algorithm on each, then testing it on the others, doing it both ways and averaging the results.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Testing hypothesis suggested by the data - &lt;/span&gt; &lt;a href="http://en.wikipedia.org/wiki/Testing_hypotheses_suggested_by_the_data"&gt;http://en.wikipedia.org/wiki/Testing_hypotheses_suggested_by_the_data&lt;/a&gt;&lt;br /&gt;A set of data that implies a strong correlation between two variables.  This does not automatically guarantee that there is a correlation between those two variables.  Type I and Type II errors (false positives and false negatives) can be produced by always assuming that testing hypothesis suggested by the data are valid.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Type I and Type II errors - &lt;/span&gt; &lt;a href="http://en.wikipedia.org/wiki/Type_I_error#Type_I_error"&gt;http://en.wikipedia.org/wiki/Type_I_error#Type_I_error&lt;/a&gt;&lt;br /&gt;Fancy names for false positives and false negatives.  These are caused by rejecting the null hypothesis when you shouldn't have and accepting it when you should have rejected it.  &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Bias - &lt;/span&gt; &lt;a href="http://en.wikipedia.org/wiki/Bias"&gt;http://en.wikipedia.org/wiki/Bias&lt;/a&gt; &lt;a href="http://en.wikipedia.org/wiki/Biased_sample"&gt;http://en.wikipedia.org/wiki/Biased_sample&lt;/a&gt;&lt;br /&gt;Meaning unjust, lacking integrity, Bias is where there is a preference for certain ideas or data over others when the preference is unjustified given the subject at hand.  A biased sample of data can show a correlation between variables when in fact none exist.  The correlation was caused by the bias itself.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Pedantic -&lt;/span&gt; &lt;br /&gt;A pedant is a person who is overly concerned with formalism and precision, or who makes a show of his learning.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Binary categorical splits -&lt;/span&gt; &lt;br /&gt;Allows a decision tree split of the form "attribute IS value" and "attribute is not value".  See below image.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_t5IisUgM8Ro/SmE_kpqV7uI/AAAAAAAAABY/Uyl2sQzWRUE/s1600-h/decision_tree2.jpg"&gt;&lt;img style="float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 400px; height: 197px;" src="http://3.bp.blogspot.com/_t5IisUgM8Ro/SmE_kpqV7uI/AAAAAAAAABY/Uyl2sQzWRUE/s400/decision_tree2.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5359634930438893282" /&gt;&lt;/a&gt;&lt;br /&gt;For more information on Binary Categorical Splits see &lt;a href="http://www.autonlab.org/tutorials/dtree18.pdf"&gt;http://www.autonlab.org/tutorials/dtree18.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Regression Trees -&lt;/span&gt; &lt;a href="http://en.wikipedia.org/wiki/Decision_tree"&gt;http://en.wikipedia.org/wiki/Decision_tree&lt;/a&gt;&lt;br /&gt;A regression tree is a kind of decision tree that has Real valued outputs meaning that the outputs can be a decimal or integer instead of a boolean or category.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-5106185267715108881?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/5106185267715108881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2009/07/l05-definitions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/5106185267715108881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/5106185267715108881'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2009/07/l05-definitions.html' title='L05 Definitions'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_t5IisUgM8Ro/SmFEy55ZQdI/AAAAAAAAABg/5BcRTCo70nM/s72-c/decision_tree1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-4636460224495765571</id><published>2009-07-14T08:55:00.000-07:00</published><updated>2009-07-15T05:41:32.788-07:00</updated><title type='text'>L04 Understand crossover strategy.</title><content type='html'>In the last lesson we discovered how the eaters link what they see to an action to perform.  Though entertaining, this process alone will only produce randomly moving eaters.  In this lesson we investigate exactly how the eaters evolve/learn.&lt;br /&gt;&lt;br /&gt;Open up GACanvas.java, look at the crossWith function:&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid green; overflow: auto; height: 600; width: 130; color: black; background-color: white;"&gt;&lt;pre&gt;&lt;code&gt;private static class Chromosome &lt;br /&gt;{&lt;br /&gt;  .&lt;br /&gt;  .&lt;br /&gt;  .&lt;br /&gt;  void crossWith(Chromosome c) {&lt;br /&gt;    int crossPoint = (int)(Math.random()*128);&lt;br /&gt;    byte temp;&lt;br /&gt;    int ct = 0;&lt;br /&gt;    for (int i = 0; i &amp;lt 16; i++) {&lt;br /&gt;      for (int j = 0; j &amp;lt 4; j++) {&lt;br /&gt;        if (ct &amp;gt crossPoint) {&lt;font color="red"&gt;&lt;br /&gt;          temp  = newState[i][j];&lt;br /&gt;          newState[i][j] = c.newState[i][j];&lt;br /&gt;          c.newState[i][j] = temp;&lt;/font&gt;&lt;br /&gt;        }&lt;br /&gt;        ct++;&lt;br /&gt;        if (ct &amp;gt crossPoint) {&lt;font color="red"&gt;&lt;br /&gt;          temp  = whatToDo[i][j];&lt;br /&gt;          whatToDo[i][j] = c.whatToDo[i][j];&lt;br /&gt;          c.whatToDo[i][j] = temp;&lt;/font&gt;&lt;br /&gt;        }&lt;br /&gt;        ct++;&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Marked in red shows the genetic material mixing strategy.  David Eck has chosen a '&lt;span style="font-weight:bold;"&gt;Single Point Crossover&lt;/span&gt;' strategy.  To get a visual representation of what's going on here, read all of this: &lt;br /&gt;&lt;a href="http://www.obitko.com/tutorials/genetic-algorithms/crossover-mutation.php"&gt;http://www.obitko.com/tutorials/genetic-algorithms/crossover-mutation.php&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This 'Single Point Crossover' strategy can damage the discoveries of the parent eaters, so why does he use it?  Why damage the potential discoveries?  Why not just just make copies of the best eaters?  &lt;br /&gt;&lt;br /&gt;Good question.  David Eck knows that combining parents will increase the chance that a child will get 2 smart ideas in it where each parent only had one smart idea each, the child will be much better at finding plants.&lt;br /&gt;&lt;br /&gt;Let me illustrate with colors:&lt;pre&gt;    Legend:&lt;br /&gt;      row 0 = eater sees a wall.&lt;br /&gt;      row 1 = eater sees an eater.&lt;br /&gt;      row 2 = eater sees a space.&lt;br /&gt;      row 3 = eater sees a plant.&lt;br /&gt;&lt;br /&gt;      0 = turn left&lt;br /&gt;      1 = turn right&lt;br /&gt;      2 = move forward&lt;br /&gt;      3 = move backward&lt;br /&gt;&lt;br /&gt;      dash = Junk Data, random dumb movement.&lt;/pre&gt;&lt;br /&gt;Here is Mom's genetic code, she has figured out that when you see a plant, the best movement is to move forward into it.  She also discovered that if you see a wall, the best movements are turn right, turn left, or go in reverse.  Good job Mom.  One problem, the right side of her genetic code is full of junk.  When her state is set to 4 or higher, she starts doing dumb things.&lt;pre&gt;&lt;br /&gt;   Mom's newState array:&lt;br /&gt;   0  &lt;b&gt;&lt;font color="pink"&gt;0313110---------&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;   1  &lt;b&gt;&lt;font color="pink"&gt;-100------------&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;   2  &lt;b&gt;&lt;font color="pink"&gt;-2--------------&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;   3  &lt;b&gt;&lt;font color="pink"&gt;2222------------&lt;/font&gt;&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;Here is Dad's genetic code, like Mom, he figured out that seeing a plant means you should move into it.  But his good ideas are only on the right, not the left.  Just like mom, he does well when the state is 9 or higher, but when it is lower, he moves randomly.&lt;pre&gt;&lt;br /&gt;   Dad's newState array:&lt;br /&gt;   &lt;b&gt;&lt;font color="blue"&gt;---------100110-&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;   &lt;b&gt;&lt;font color="blue"&gt;---------1212122&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;   &lt;b&gt;&lt;font color="blue"&gt;----------------&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;   &lt;b&gt;&lt;font color="blue"&gt;---------22-2-2-&lt;/font&gt;&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So here is our dilemma, how to we mate these two champions?  Should we populate the world with new copies of Mom and Dad and let them duke it out?  What if there was a way to keep the good idea of Mom, and keep the good idea of Dad and put both into ONE the child eaters?  This eater would always do the smart thing.&lt;br /&gt;&lt;br /&gt;So I'm hand picking a crossover point for the &lt;span style="font-weight:bold;"&gt;Single Point Crossover&lt;/span&gt; as position 6 so we can see the potential.&lt;br /&gt;&lt;br /&gt;So here is our Child eater:&lt;pre&gt;   0  &lt;b&gt;&lt;font color="pink"&gt;031311&lt;/font&gt;&lt;font color="blue"&gt;---100110-&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;   1  &lt;b&gt;&lt;font color="pink"&gt;-100--&lt;/font&gt;&lt;font color="blue"&gt;---1212122&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;   2  &lt;b&gt;&lt;font color="pink"&gt;-2----&lt;/font&gt;&lt;font color="blue"&gt;----------&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;   3  &lt;b&gt;&lt;font color="pink"&gt;2222--&lt;/font&gt;&lt;font color="blue"&gt;---22-2-2-&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;This child eater is much smarter then the individual parents.  This situation happens once in a great while, the risk of damaging the genetic code to secure these gains are worth it.&lt;br /&gt;&lt;br /&gt;We've exhausted the Genetic Algorithms part of this program.  The rest is just rules to refine this process.  The Mutation part introduces mistakes into the child genetic code.  Suppose state 5 had '2'(move forward) for sight '3'(see plant).  This is a wise thing to do.  But the mutation flips this to 'turn right'.  In most situations this is only going to hurt productivity.  But once in a great while it will actually make the eater do the right thing instead of the wrong thing.&lt;br /&gt;&lt;br /&gt;The magic of this program is that complexity emerges within it that I haven't described.  Given enough CPU time, the eaters will discover strategies for circling the clumps of plants when it finds them.  Also the eaters develop good search strategies, like circular motions or scanning patterns.  Also, when the eaters approach lots of eaters, it's likely a good idea to go far away from there because the eaters likely already ate up the food.  The eaters discover competition is bad if it wants a big clump for itself.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And thus, man became the architect of his own demise, though loyal and pure, the machines earned no respect from their masters, these curious, endlessly multiplying mammals.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-4636460224495765571?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/4636460224495765571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2009/07/lesson-04-understand-code-2.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/4636460224495765571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/4636460224495765571'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2009/07/lesson-04-understand-code-2.html' title='L04 Understand crossover strategy.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-8814054134045754483</id><published>2009-07-11T18:48:00.000-07:00</published><updated>2009-10-14T08:28:27.420-07:00</updated><title type='text'>L03 Understand the genetic material.</title><content type='html'>In the last lesson you got David Eck's GA program to run in Eclipse.  You should have the source code visible.  Open up GACanvas.java,  see the java class called Chromosome:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="border: 1px solid green; overflow: auto; height: 600; width: 130; color: black; background-color: white;"&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;   private static final int turnLeft=0, &lt;br /&gt;                            turnRight=1, &lt;br /&gt;                            forward=2, &lt;br /&gt;                            back=3;&lt;br /&gt;   private static final int seeWall=0, &lt;br /&gt;                            seeEater=1, &lt;br /&gt;                            seeSpace=2, &lt;br /&gt;                            seePlant=3;&lt;br /&gt;   ...&lt;br /&gt;   ...&lt;br /&gt;   ...&lt;br /&gt;&lt;br /&gt;   private static class Chromosome&lt;br /&gt;   {&lt;font color="red"&gt;&lt;br /&gt;      byte[][] newState = new byte[16][4];&lt;br /&gt;      byte[][] whatToDo = new byte[16][4];&lt;/font&gt;&lt;br /&gt;      void randomize() {&lt;br /&gt;         for (int i = 0; i &amp;lt 16; i++) {&lt;br /&gt;            for (int j = seeWall; j &amp;lt= seePlant; j++) {&lt;font color="red"&gt;&lt;br /&gt;                newState[i][j] = (byte)(Math.random()*16);&lt;br /&gt;                whatToDo[i][j] = (byte)(Math.random()*4);&lt;/font&gt;&lt;br /&gt;            }&lt;br /&gt;         }&lt;br /&gt;      }&lt;br /&gt;      .&lt;br /&gt;      .&lt;br /&gt;      .&lt;br /&gt;   }&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Highlighted in red are arrays named newState, and whatToDo.  It might be useful for us to review what a Chromosome is:&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Chromosome"&gt;http://en.wikipedia.org/wiki/Chromosome&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Biologists will note that this array David Eck has created is not exactly a Chromosome.  Here is the primary difference:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;A Biological Chromosome ...&lt;/span&gt;&lt;br /&gt;Contains instructions to build every interdependent system and component of a life form.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;David Eck's Chromosome Array ...&lt;/span&gt;&lt;br /&gt;Contains instructions to link 1 of 4 observations to 1 of 4 defined movements.&lt;br /&gt;&lt;br /&gt;So 'Chromosome' is a bit of a stretch.  Moving right along, here is what the arrays look like, the genetic material is outlined in bold blue with explanations on the right:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;  newState array:&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;      0  1  2  3          Meaning of array data:&lt;br /&gt;      -----------         ----------------------&lt;br /&gt;                          The values in newState are &lt;br /&gt;0     &lt;b&gt;&lt;font color="blue"&gt;12 9  4  8&lt;/font&gt;&lt;/b&gt;          assigned from 0 to 15.&lt;br /&gt;1     &lt;b&gt;&lt;font color="blue"&gt;11 12 8  3&lt;/font&gt;&lt;/b&gt;          &lt;br /&gt;2     &lt;b&gt;&lt;font color="blue"&gt;14 3  9  13&lt;/font&gt; &lt;/b&gt;        Each row in this array is called &lt;br /&gt;3     &lt;b&gt;&lt;font color="blue"&gt;2  0  10 11 &lt;/font&gt;&lt;/b&gt;        a 'state'.&lt;br /&gt;4     &lt;b&gt;&lt;font color="blue"&gt;3  7  15 9 &lt;/font&gt;&lt;/b&gt;&lt;br /&gt;5     &lt;b&gt;&lt;font color="blue"&gt;1  8  11 2 &lt;/font&gt;&lt;/b&gt;&lt;br /&gt;.                         In each iteration, the eater &lt;br /&gt;.                         sees, then acts, then loads &lt;br /&gt;.                         the next state as defined &lt;br /&gt;15    &lt;b&gt;&lt;font color="blue"&gt;12 10 9  15 &lt;/font&gt;&lt;/b&gt;        in newState.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;  whatToDo array:&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;      0  1  2  3           Meaning of array data&lt;br /&gt;      ----------           ---------------------&lt;br /&gt;                           0 = turn left&lt;br /&gt;0     &lt;b&gt;&lt;font color="blue"&gt;0  3  0  1&lt;/font&gt;&lt;/b&gt;           1 = turn right&lt;br /&gt;1     &lt;b&gt;&lt;font color="blue"&gt;3  2  1  1&lt;/font&gt;&lt;/b&gt;           2 = move forward&lt;br /&gt;2     &lt;b&gt;&lt;font color="blue"&gt;2  1  0  3&lt;/font&gt;&lt;/b&gt;           3 = move backward&lt;br /&gt;3     &lt;b&gt;&lt;font color="blue"&gt;1  0  3  2&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;4     &lt;b&gt;&lt;font color="blue"&gt;3  1  2  3&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;5     &lt;b&gt;&lt;font color="blue"&gt;2  3  0  0&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;.                          &lt;br /&gt;.                        &lt;br /&gt;.&lt;br /&gt;15    &lt;b&gt;&lt;font color="blue"&gt;1  1  3  0&lt;/font&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;For both of the arrays, columns 0 through 3 represent what the eater sees directly in front of it:&lt;br /&gt;column 0  = eater sees a wall.&lt;br /&gt;column 1  = eater sees an eater.&lt;br /&gt;column 2  = eater sees a space.&lt;br /&gt;column 3  = eater sees a plant.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Here is how the eater links sight to action:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt; &lt;li&gt;Eater starts on state 0&lt;/li&gt;&lt;br /&gt; &lt;li&gt;The Eater looks ahead.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Eater sees a plant!&lt;/li&gt;&lt;br /&gt; &lt;li&gt;plant is represented by column 3&lt;/li&gt;&lt;br /&gt; &lt;li&gt;whatToDo array is read [state index][see what]&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Eater sees that we should do action 1&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Action 1 = turn right&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Eater turns right&lt;/li&gt;&lt;br /&gt; &lt;li&gt;newState array read [state index][see what]&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Read newState as '8'.&lt;/li&gt;&lt;br /&gt; &lt;li&gt;Repeat step 1 with state 8.&lt;/li&gt;&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This loop is done many times, and if the eater lands on a plant, the eater's score is incremented by one.  At the end of a generation, all of the scores of all the eaters are reviewed, and only the eaters that got the most plants get to have their genetic codes passed onto the next generation.&lt;br /&gt;&lt;br /&gt;In the next lesson we talk about how the eater parents make out and combine the two genetic codes to create several offspring with genetic codes that are likely to retain the discoveries of the parents.  Also we'll talk about how errors in the genetic code copying (mutation) is absolutely necessary for the eaters to become diverse and speed the discovery of new food finding strategies.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-8814054134045754483?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/8814054134045754483/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2009/07/lesson-02_11.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/8814054134045754483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/8814054134045754483'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2009/07/lesson-02_11.html' title='L03 Understand the genetic material.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-7253842719902223694</id><published>2009-07-10T11:27:00.000-07:00</published><updated>2009-10-14T08:25:24.544-07:00</updated><title type='text'>L02 Compile a Genetic Algorithm in Java.</title><content type='html'>The purpose of this lesson is to compile and run David Eck's GA program illustrated in "Lesson 01".  This lesson assumes you have proficiency to install Eclipse and build a java application, if you don't, you might want to find some tutorials that walk you through creating an Eclipse Java 'Hello World' Application before following along.&lt;br /&gt;&lt;br /&gt;If you already know how to compile a java application through Eclipse then you can skip this lesson after downloading, installing and running the java files &lt;a href="http://machinesentience.com/eric_leschinski_resume/DavidEckGeneticAlgorithmsEaters/"&gt;HERE&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Step 1:  Download Eclipse and run it&lt;br /&gt;&lt;a href="http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/R/eclipse-java-galileo-win32.zip"&gt;http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/galileo/R/eclipse-java-galileo-win32.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Step 2: Create a new Java Project  File -&gt; New -&gt; Java Project&lt;br /&gt;&lt;br /&gt;Step 3: Name the project 'GeneticAlgorithmExample', press Finish.&lt;br /&gt;&lt;br /&gt;Step 4: Download the java files &lt;a href="http://machinesentience.com/eric_leschinski_resume/DavidEckGeneticAlgorithmsEaters/"&gt;HERE&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Step 5: right click the 'src' directory and click New -&gt; Class&lt;br /&gt;&lt;br /&gt;Step 6: You will be creating 5 empty class files under the 'src' directory, the names of the class files is as follows:&lt;br /&gt;GACanvas.java&lt;br /&gt;GAFrame.java&lt;br /&gt;Launcher.java&lt;br /&gt;RadioGroupMenu.java&lt;br /&gt;ReportWin.java&lt;br /&gt;&lt;br /&gt;Step 7:  Access the files you downloaded in step 4, paste the content of the downloaded files into your class files with the same name.&lt;br /&gt;&lt;br /&gt;Step 8:  Compile and run the program, if you don't have the right version of Java installed and accessible by Eclipse it may spit up errors.  I use the latest version of java-1.7.0-icedtea but I assume most versions would work from java 1.4.0 or higher.&lt;br /&gt;&lt;br /&gt;Step 9:  Your Artificially Learning eaters should be on screen and doing their thing trying to locate food and getting better at it.  Play around with it.  You should notice the arrays holding the genetic material and the functions responsible for mutation and reproduction.&lt;br /&gt;&lt;br /&gt;This is what you should have on screen at this point:&lt;br /&gt;&lt;br /&gt;Click to Enlarge:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_t5IisUgM8Ro/SlePzYbyLMI/AAAAAAAAABA/JN7sejiKOIw/s1600-h/DavidEckGAScreenshot02.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 400px; height: 300px;" src="http://1.bp.blogspot.com/_t5IisUgM8Ro/SlePzYbyLMI/AAAAAAAAABA/JN7sejiKOIw/s400/DavidEckGAScreenshot02.jpg" alt="" id="BLOGGER_PHOTO_ID_5356908394675580098" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the next Lesson we will examine the individual functions in detail.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-7253842719902223694?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/7253842719902223694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2009/07/lesson-02.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/7253842719902223694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/7253842719902223694'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2009/07/lesson-02.html' title='L02 Compile a Genetic Algorithm in Java.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_t5IisUgM8Ro/SlePzYbyLMI/AAAAAAAAABA/JN7sejiKOIw/s72-c/DavidEckGAScreenshot02.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-4622397331224349693</id><published>2009-07-09T17:57:00.000-07:00</published><updated>2009-10-14T08:25:39.569-07:00</updated><title type='text'>L01 Preview a Genetic Algorithm.</title><content type='html'>The purpose of this lesson is to demonstrate the power of the Genetic Algorithm in laymans terms.  This lesson is not to teach you, but to impress you.&lt;br /&gt;&lt;br /&gt;To prove that the long words I use are not just a waste of brain space, we'll look at an example proving that Genetic Algorithms are very useful.&lt;br /&gt;&lt;br /&gt;Visit this website:  &lt;a href="http://math.hws.edu/xJava/GA/"&gt;http://math.hws.edu/xJava/GA/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;On that website there is an applet embedded into the web page, if it does not show the button called: "Start the World" then try a different browser.  Firefox worked for me.&lt;br /&gt;&lt;br /&gt;This screen shot shows what David Eck has coded in Java:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_t5IisUgM8Ro/SlaWnSkZXII/AAAAAAAAAA4/jAtz2K0hlSU/s1600-h/DavidEckGAScreenshot01.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 401px; height: 204px;" src="http://3.bp.blogspot.com/_t5IisUgM8Ro/SlaWnSkZXII/AAAAAAAAAA4/jAtz2K0hlSU/s400/DavidEckGAScreenshot01.jpg" alt="" id="BLOGGER_PHOTO_ID_5356634408547343490" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The red lines are eaters, the green circles are food.&lt;br /&gt;&lt;br /&gt;The eaters have one sensor to see what is ahead of them.  They have effectors to rotate or move themselves.   Each eater has a 2D array of instructional data that determines what the eater will do based on what it has seen.&lt;br /&gt;&lt;br /&gt;If you observe the behavior over the first 20 generations and then choose the 'Speed' Menu and select "Highest" for a few minutes and then set it back to normal speed you will see that the eaters are getting more proficient at locating the food.&lt;br /&gt;&lt;br /&gt;After hundreds of generations the eaters start to appear life like, they appear to move toward their intended destination which is the food.&lt;br /&gt;&lt;br /&gt;David Eck did not write code to cause the eaters to efficiently find food, in the next lesson we will run the code through Eclipse ourselves to prove that.&lt;br /&gt;&lt;br /&gt;In case David Eck takes down the site, here are the Java code files:&lt;br /&gt;&lt;a href="http://machinesentience.com/eric_leschinski_resume/DavidEckGeneticAlgorithmsEaters"&gt;Backup of David Eck's Source code in Java&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;GACanvas.java, GAFrame.java, Launcher.java, RadioGroupMenu.java, ReportWin.java&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-4622397331224349693?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/4622397331224349693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2009/07/lesson-01.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/4622397331224349693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/4622397331224349693'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2009/07/lesson-01.html' title='L01 Preview a Genetic Algorithm.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_t5IisUgM8Ro/SlaWnSkZXII/AAAAAAAAAA4/jAtz2K0hlSU/s72-c/DavidEckGAScreenshot01.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-1766238407596443354</id><published>2009-07-08T19:47:00.000-07:00</published><updated>2009-07-17T17:05:32.440-07:00</updated><title type='text'>Definitions</title><content type='html'>The notion of Machine Intelligence and Machine Learning gets me up in the morning.  I Love it.  It can make you happy too.&lt;br /&gt;&lt;br /&gt;Lets start with terminology.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1.  Heuristic &lt;/span&gt; -   &lt;a href="http://en.wikipedia.org/wiki/Heuristic"&gt;http://en.wikipedia.org/wiki/Heuristic&lt;/a&gt;&lt;br /&gt;An algorithm that gets us to an approximate solution very fast.  The heuristic algorithm uses common sense, good judgment and educated guesses to arrive near the best solution.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2.  Metaheuristic&lt;/span&gt; - &lt;a href="http://en.wikipedia.org/wiki/Metaheuristic"&gt;http://en.wikipedia.org/wiki/Metaheuristic&lt;/a&gt;&lt;br /&gt;A Heuristic finds the best solution value, a metaheuristic finds the best solution heuristic.  Use Metaheuristics to solve how to best solve computational problems.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3.  Simulated Annealing&lt;/span&gt; - &lt;a href="http://en.wikipedia.org/wiki/Simulated_annealing"&gt;http://en.wikipedia.org/wiki/Simulated_annealing&lt;/a&gt;&lt;br /&gt;Annealing in metallurgy is where you harden a metal by cooling it slowly which allows the entire batch of metal to be more pure than if cooled quickly.  Doing Simulated Annealing means a a Metaheuristic Algorithm is being used to produce a solution set by randomly changing properties within the state and evaluating if that change would lead to a better state.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4.  Fitness Algorithm&lt;/span&gt; - &lt;a href="http://en.wikipedia.org/wiki/Fitness_function"&gt;http://en.wikipedia.org/wiki/Fitness_function&lt;br /&gt;&lt;/a&gt;  Is used to calculate which solution is better.  Without a reliable fitness function, the Genetic Algorithm will not evolve toward the best solution.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5.  Genetic Algorithms&lt;/span&gt; -  &lt;a href="http://en.wikipedia.org/wiki/Genetic_algorithms"&gt;http://en.wikipedia.org/wiki/Genetic_algorithms&lt;/a&gt;&lt;br /&gt;Algorithms that use inheritance, mutation, selection and crossover to evolve the group toward better solutions.  A fitness function is used to determine which solutions are selected, mutated, crossed over and passed down to create new offspring solutions.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;6.  Channel Routing&lt;/span&gt; - &lt;a href="http://en.wikipedia.org/wiki/Routing"&gt;http://en.wikipedia.org/wiki/Routing&lt;/a&gt;&lt;br /&gt;Describes a kind of problem where multiple routes to a destination exist.  The route selected needs to be chosen and optimized for balance as well as speed.  Channel Routing describes the solution selection process that chip designers use to pack as much functionality on a chip as possible.  With the Travelling Salesman problem, channel routing describes how solutions are initially chosen.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;7.  Travelling Salesman problem&lt;/span&gt; - &lt;a href="http://en.wikipedia.org/wiki/Travelling_salesman_problem"&gt;http://en.wikipedia.org/wiki/Travelling_salesman_problem&lt;/a&gt;&lt;br /&gt;A kind of problem best solved with a heuristic, or Genetic Algorithm because it is NP-Complete.  Brute force, or deterministic approaches to solving NP-Complete problems will never produce the best result for large problem sets.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;8.  NP-Complete&lt;/span&gt; - &lt;a href="http://en.wikipedia.org/wiki/NP-complete"&gt;http://en.wikipedia.org/wiki/NP-complete&lt;/a&gt;&lt;br /&gt;This means that the algorithm will take an unreasonable amount of time to solve exactly for medium to large problem sets.  The time needed to solve the problem approaches infinity as the size of the input set increases.  Heuristics and Genetic algorithms are required for NP-Complete problems.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;9.  “Million Queens” problem&lt;/span&gt; - &lt;a href="http://en.wikipedia.org/wiki/N_queens"&gt;http://en.wikipedia.org/wiki/N_queens&lt;/a&gt;&lt;br /&gt;Put a million queens on a chessboard with a width of 1 million squares such that no queen is attacking another. It would be ridiculous to place them all on the same row and test that for fitness.   Solving 8 Queens quickly illustrates understanding of algorithms.  Solving the "million queens" requires knowledge of well built heuristics to vastly decrease the solution set.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;10.  Iterative Improvement&lt;/span&gt;&lt;br /&gt;Starting at a random state, change something and evaluate if the situation improved.  If yes, keep the change, if not go back.  Store the best value and if your stuck, restart somewhere else.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;11.  Local Optimum&lt;/span&gt; - &lt;a href="http://en.wikipedia.org/wiki/Local_optimum"&gt;http://en.wikipedia.org/wiki/Local_optimum&lt;br /&gt;&lt;/a&gt;  A solution is the local optimum when the immediate neighboring solutions are all worse than the current one.  To break out from local optimum, a breakout strategy must be used.  Breakout strategies include increased mutations, randomness or restarting elsewhere.&lt;br /&gt;&lt;br /&gt;If you understand and are interested in all of these terms, this PDF from Carnegie Mellon will interest you &lt;a href="http://www.autonlab.org/tutorials/hillclimb02.pdf"&gt;http://www.autonlab.org/tutorials/hillclimb02.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I Found it through here: &lt;a href="http://www.autonlab.org/tutorials/"&gt;http://www.autonlab.org/tutorials/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-1766238407596443354?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/1766238407596443354/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2009/07/definitions-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/1766238407596443354'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/1766238407596443354'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2009/07/definitions-1.html' title='Definitions'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3682857354725297944.post-259396440391600170</id><published>2009-07-08T19:24:00.000-07:00</published><updated>2009-09-29T20:15:43.990-07:00</updated><title type='text'>Introduction.</title><content type='html'>The objective of this blog includes educating myself and others about everything related to elite programming and machine learning.&lt;br /&gt;&lt;br /&gt;I started it because I want to create a function to predict the future of the securities markets by writing software to find and rate positive divergence in the stock market.  But in order to do that I'll have to expand my mental faculties by immersing myself in this stuff.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3682857354725297944-259396440391600170?l=sentientmachine.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sentientmachine.blogspot.com/feeds/259396440391600170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sentientmachine.blogspot.com/2009/07/hello-world-post.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/259396440391600170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3682857354725297944/posts/default/259396440391600170'/><link rel='alternate' type='text/html' href='http://sentientmachine.blogspot.com/2009/07/hello-world-post.html' title='Introduction.'/><author><name>SentientMachine</name><uri>http://www.blogger.com/profile/07224289594732537100</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='28' src='http://3.bp.blogspot.com/_t5IisUgM8Ro/Suy6RpyOCYI/AAAAAAAAAEA/KvyR_KqGjnw/S220/eric_leschinski_2009_10_31.jpg'/></author><thr:total>1</thr:total></entry></feed>
