<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>ADM Blog &#187; actionscript3</title> <atom:link href="http://blog.another-d-mention.ro/tag/actionscript3/feed/" rel="self" type="application/rss+xml" /><link>http://blog.another-d-mention.ro</link> <description>No matter how you see things, reality changes when you reach understanding</description> <lastBuildDate>Fri, 22 Jul 2011 06:56:49 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.1</generator> <item><title>Neural networks in ActionScript 3</title><link>http://blog.another-d-mention.ro/programming/neural-networks-in-actionscript-3/</link> <comments>http://blog.another-d-mention.ro/programming/neural-networks-in-actionscript-3/#comments</comments> <pubDate>Thu, 11 Mar 2010 14:07:00 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Flex / ActionScript]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[actionscript3]]></category> <category><![CDATA[ai]]></category> <category><![CDATA[artificial]]></category> <category><![CDATA[flash]]></category> <category><![CDATA[flex]]></category> <category><![CDATA[intelligence]]></category> <category><![CDATA[networks]]></category> <category><![CDATA[neural]]></category> <guid
isPermaLink="false">http://blog.another-d-mention.ro/?p=807</guid> <description><![CDATA["An artificial neural network (ANN), usually called "neural network" (NN), is a mathematical model or computational model that tries to simulate the structure and/or functional aspects of biological neural networks. It consists of an interconnected group of artificial neurons and processes information using a connectionist approach to computation. In most cases an ANN is an [...]
Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/programming/how-to-clone-duplicate-an-object-in-actionscript-3/' rel='bookmark' title='Permanent Link: How to clone (duplicate) an object in ActionScript 3'>How to clone (duplicate) an object in ActionScript 3</a></li><li><a
href='http://blog.another-d-mention.ro/programming/create-professional-flex-components/' rel='bookmark' title='Permanent Link: Create professional Flex components'>Create professional Flex components</a></li><li><a
href='http://blog.another-d-mention.ro/programming/flex-components-pack/' rel='bookmark' title='Permanent Link: Flex Components Pack'>Flex Components Pack</a></li></ol>]]></description> <content:encoded><![CDATA[<p><img
class="alignleft size-full wp-image-808" style="margin: 0px 10px 5px 0px;" title="Neural Network" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2010/03/neural-network.gif" alt="neural network Neural networks in ActionScript 3" width="150" height="113" />"An <strong>artificial neural network (ANN)</strong>, usually called "neural  network" (NN), is a mathematical model or computational model that tries to  simulate the structure and/or functional aspects of biological neural  networks. It consists of an interconnected group of artificial neurons and processes information using a connectionist approach to computation. In most cases an ANN is an adaptive system that changes its structure based on external  or internal information that flows through the network during the  learning phase. Neural networks are non-linear statistical data  modeling tools. They can be used to model complex relationships  between inputs and outputs or to find patterns in data." (<a
href="http://en.wikipedia.org/wiki/Artificial_neural_network">Wikipedia</a>)</p><p><a
href="http://cache.another-d-mention.ro/images/wp-content/uploads/2010/03/mlp3.gif"><img
class="alignright size-full wp-image-809" title="Multi Layer Perceptron" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2010/03/mlp3.gif" alt="mlp3 Neural networks in ActionScript 3" width="164" height="224" /></a>So, repetition is the mother of all learning they say. You damn right it is. And you can do it in AS3 of course. Not the fastest choice out there but that's not the point. NN's are usually not that fast but they're useful in so many ways.</p><p>So, here is my implementation of a neural network multi-layer-perceptron made in AS3, set to learn a simple XOR problem. It uses 2 inputs neurons , 2 hidden layers, each having 2 neurons and one output neuron. It takes about 2 seconds to train it using 10.000 epochs, but then you can save a snapshot of the NN memory as a byteArray, save it to the server and load it back again in an instant without requiring a new training.  I didn't take the time to thoroughly document the classes just yet but I'm sure you'll find them pretty easy to use.</p><p>Some reading material:<br
/> <a
href="http://en.wikipedia.org/wiki/Artificial_neural_network" target="_blank">http://en.wikipedia.org/wiki/Artificial_neural_network</a><br
/> <a
href="http://fbim.fh-regensburg.de/~saj39122/jfroehl/diplom/e-index.html" target="_blank">http://fbim.fh-regensburg.de/~saj39122/jfroehl/diplom/e-index.html</a> (this is great)<br
/> <a
href="http://www.ai-junkie.com/ann/evolved/nnt1.html" target="_blank">http://www.ai-junkie.com/ann/evolved/nnt1.html</a></p><div
align="center"> <object
id="nnet" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="397" height="411" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param
name="quality" value="high" /><param
name="bgcolor" value="#FFFFFF" /><param
name="allowScriptAccess" value="sameDomain" /><param
name="src" value="http://cache.another-d-mention.ro/stuff/nnet/NeuralNetworks.swf" /><param
name="name" value="SmartImage" /><param
name="align" value="middle" /><embed
id="nnet" type="application/x-shockwave-flash" width="397" height="411" src="http://cache.another-d-mention.ro/stuff/nnet/NeuralNetworks.swf" align="middle" name="SmartImage" allowscriptaccess="sameDomain" bgcolor="#FFFFFF" quality="high"></embed></object></div><p><a
href="http://cache.another-d-mention.ro/stuff/nnet/srcview/" target="_blank">Sources</a> and <a
href="http://cache.another-d-mention.ro/stuff/nnet/srcview/NeuralNetworks.zip" target="_blank">Download</a></p><p><script type="text/javascript">google_ad_client = "ca-pub-3771432957882119";
/* InsidePost */
google_ad_slot = "9112434755";
google_ad_width = 468;
google_ad_height = 60;</script><br
/> <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></p><p>Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/programming/how-to-clone-duplicate-an-object-in-actionscript-3/' rel='bookmark' title='Permanent Link: How to clone (duplicate) an object in ActionScript 3'>How to clone (duplicate) an object in ActionScript 3</a></li><li><a
href='http://blog.another-d-mention.ro/programming/create-professional-flex-components/' rel='bookmark' title='Permanent Link: Create professional Flex components'>Create professional Flex components</a></li><li><a
href='http://blog.another-d-mention.ro/programming/flex-components-pack/' rel='bookmark' title='Permanent Link: Flex Components Pack'>Flex Components Pack</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://blog.another-d-mention.ro/programming/neural-networks-in-actionscript-3/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Ho-To: Install Alchemy</title><link>http://blog.another-d-mention.ro/programming/ho-to-install-alchemy/</link> <comments>http://blog.another-d-mention.ro/programming/ho-to-install-alchemy/#comments</comments> <pubDate>Wed, 24 Jun 2009 06:51:53 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Flex / ActionScript]]></category> <category><![CDATA[How To's]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[actionscript3]]></category> <category><![CDATA[alchemy]]></category> <category><![CDATA[as3]]></category> <category><![CDATA[C#]]></category> <category><![CDATA[flash]]></category> <category><![CDATA[flex]]></category> <category><![CDATA[library]]></category> <guid
isPermaLink="false">http://blog.another-d-mention.ro/?p=493</guid> <description><![CDATA[For those of you who tried but didn't succed, I found some straigthforward instructions for this. Setup Hell: Install cygwin to "c:\cygwin" - make sure to check boxes to install Perl, "Archive" (ZIP), and Devel/gcc:g++ (3.4.4.3 presumably) (is Perl necessary?) Copy the alchemy directory to: c:\cygwin\home\Lee Copy the flex sdk bin dir from c:\program files\etc [...]
Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/programming/flex-components-pack/' rel='bookmark' title='Permanent Link: Flex Components Pack'>Flex Components Pack</a></li><li><a
href='http://blog.another-d-mention.ro/programming/create-professional-flex-components/' rel='bookmark' title='Permanent Link: Create professional Flex components'>Create professional Flex components</a></li><li><a
href='http://blog.another-d-mention.ro/misc/eee-pc/install-windows-xp-on-your-asus-eee-pc-using-a-usb-flash-drive/' rel='bookmark' title='Permanent Link: Install Windows XP on your Asus Eee PC using a USB flash drive'>Install Windows XP on your Asus Eee PC using a USB flash drive</a></li></ol>]]></description> <content:encoded><![CDATA[<p>For those of you who tried but didn't succed, I found some straigthforward instructions for this.</p><h4 class="vspace">Setup Hell:</h4><p>Install cygwin to "c:\cygwin" - make sure to check boxes to install Perl, "Archive" (ZIP), and Devel/gcc:g++ (3.4.4.3 presumably) (is Perl necessary?)<br
/> Copy the alchemy directory to: c:\cygwin\home\Lee<br
/> Copy the flex sdk bin dir from c:\program files\etc to "c:\flex" (to avoid paths with spaces in it!)<br
/> Run the alchemy config script once:</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;">   run cygwin
   <span style="color: #7a0874; font-weight: bold;">cd</span> alchemy
   .<span style="color: #000000; font-weight: bold;">/</span>config</pre></div></div><p>Edit the textfile "C:\cygwin\home\Lee\alchemy\alchemy-setup" and uncomment and edit line 22 to: add "export ADL=c:\flex\adl.exe"</p><p>Edit .bashrc (in C:\cygwin\home\Lee)</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;">   <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;LEE PROFILE&quot;</span>
   <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">FLEX_HOME</span>=~<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">flex</span>
   <span style="color: #7a0874; font-weight: bold;">export</span> <span style="color: #007800;">ALCHEMY_HOME</span>=~<span style="color: #000000; font-weight: bold;">/</span>alchemy
&nbsp;
   <span style="color: #666666; font-style: italic;"># &quot;This should be added before your PATH is modified&quot; !!</span>
   <span style="color: #7a0874; font-weight: bold;">source</span> <span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>Lee<span style="color: #000000; font-weight: bold;">/</span>alchemy<span style="color: #000000; font-weight: bold;">/</span>alchemy-setup
&nbsp;
   <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$ALCHEMY_HOME</span><span style="color: #000000; font-weight: bold;">/</span>achacks:<span style="color: #000000; font-weight: bold;">/</span>home<span style="color: #000000; font-weight: bold;">/</span>Lee<span style="color: #000000; font-weight: bold;">/</span><span style="color: #c20cb9; font-weight: bold;">flex</span>:<span style="color: #007800;">$PATH</span>
   <span style="color: #7a0874; font-weight: bold;">export</span> PATH
&nbsp;
   alc-on</pre></div></div><p>Do this (just once, I think):</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;">   <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #007800;">$ALCHEMY_HOME</span><span style="color: #000000; font-weight: bold;">/</span>bin
   <span style="color: #c20cb9; font-weight: bold;">ln</span> <span style="color: #660033;">-s</span> llvm-stub llvm-stub.exe</pre></div></div><h4 class="vspace">Compiling a SW:</h4><p>CD to the directory with the source<br
/> Always do "alc-on" before compiling, cuz it doesn't work without it even though i added it to the startup (dunno)</p><div
class="wp_syntax"><div
class="code"><pre class="bash" style="font-family:monospace;">    <span style="color: #c20cb9; font-weight: bold;">gcc</span> stringecho.c <span style="color: #660033;">-O3</span> <span style="color: #660033;">-Wall</span> <span style="color: #660033;">-swc</span> <span style="color: #660033;">-o</span> stringecho.swc
    <span style="color: #660033;">--</span> should give you a swc.</pre></div></div><p>Import the swc into your flex builder 4 project and make sure compiler targets SDK v4</p><h4 class="vspace">Shortcuts</h4><p><strong>alc-home</strong> - takes you to the Alchemy install folder.<br
/> <strong>alc-on</strong> - puts Alchemy gcc toolchain replacements at the front of your path.<br
/> <strong>alc-off</strong> - restores original path.<br
/> <strong>alc-util</strong> - shows you various Alchemy-related environment vars</p><p
class="vspace">USEFUL TO KNOW</p><p><strong>which gcc</strong> - tells you which gcc it will use (should be the one in the achacks dir)<br
/> <strong>ln</strong> - links shit<br
/> <strong>rm</strong> - deletes links as well as files</p><p
class="vspace">Ugh: Make sure to do "alc-on" and "alchemy-setup" even though you put it in the startup script <img
src='http://blog.another-d-mention.ro/wp-includes/images/smilies/icon_sad.gif' alt="icon sad Ho To: Install Alchemy" class='wp-smiley' title="Ho To: Install Alchemy" /> (?)</p><p
class="vspace">...</p><p>Objects:<br
/> <span
class="wikiword">AS3</span>_Val<br
/> <span
class="wikiword">AS3</span>_ArrayValue</p><p>Methods:<br
/> <span
class="wikiword">AS3</span>_Release<br
/> <span
class="wikiword">AS3</span>_LibInit</p><p>Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/programming/flex-components-pack/' rel='bookmark' title='Permanent Link: Flex Components Pack'>Flex Components Pack</a></li><li><a
href='http://blog.another-d-mention.ro/programming/create-professional-flex-components/' rel='bookmark' title='Permanent Link: Create professional Flex components'>Create professional Flex components</a></li><li><a
href='http://blog.another-d-mention.ro/misc/eee-pc/install-windows-xp-on-your-asus-eee-pc-using-a-usb-flash-drive/' rel='bookmark' title='Permanent Link: Install Windows XP on your Asus Eee PC using a USB flash drive'>Install Windows XP on your Asus Eee PC using a USB flash drive</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://blog.another-d-mention.ro/programming/ho-to-install-alchemy/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Flex Components Pack</title><link>http://blog.another-d-mention.ro/programming/flex-components-pack/</link> <comments>http://blog.another-d-mention.ro/programming/flex-components-pack/#comments</comments> <pubDate>Tue, 09 Jun 2009 19:50:45 +0000</pubDate> <dc:creator>admin</dc:creator> <category><![CDATA[Flex / ActionScript]]></category> <category><![CDATA[Programming]]></category> <category><![CDATA[actionscript3]]></category> <category><![CDATA[as3]]></category> <category><![CDATA[components]]></category> <category><![CDATA[flash]]></category> <category><![CDATA[flex]]></category> <category><![CDATA[library]]></category> <category><![CDATA[swc]]></category> <guid
isPermaLink="false">http://blog.another-d-mention.ro/?p=470</guid> <description><![CDATA[I've just started working on a set of Flex components which I call Flex Components Pack. I've only managed to make 11 components till now but I'm still working and have a lot of ideas on my to-do list. If any one of you is willing to help I would be very glad to get [...]
Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/programming/create-professional-flex-components/' rel='bookmark' title='Permanent Link: Create professional Flex components'>Create professional Flex components</a></li><li><a
href='http://blog.another-d-mention.ro/programming/ho-to-install-alchemy/' rel='bookmark' title='Permanent Link: Ho-To: Install Alchemy'>Ho-To: Install Alchemy</a></li><li><a
href='http://blog.another-d-mention.ro/programming/create-flexas3-applications-for-mobile-devices/' rel='bookmark' title='Permanent Link: Create Flex/AS3 applications for Mobile Devices'>Create Flex/AS3 applications for Mobile Devices</a></li></ol>]]></description> <content:encoded><![CDATA[<p><img
class="alignright size-full wp-image-471" title="list" src="http://cache.another-d-mention.ro/images/wp-content/uploads/2009/06/list.png" alt="list Flex Components Pack" width="189" height="384" /> I've just started working on a set of Flex components which I call Flex Components Pack. I've only managed to make 11 components till now but I'm still working and have a lot of ideas on my to-do list. If any one of you is willing to help I would be very glad to get an extra brain in here. Just drop me a comment or something and I'll share the road-map and SVN path with you.</p><p>I've made a <a
href="http://blog.another-d-mention.ro/downloads/components-pack/">page</a> where I will add tutorials, code examples and runnable demos as soon as possible, so check back soon. Till then, you can <a
href="http://cache.another-d-mention.ro/stuff/ADMComponents.swc">download</a> the library and take a look.</p><p><strong>Update:</strong></p><p>(13/06/2009) - Added 5 more components. A simple but nice led light switch and 4 visualisation effects (EQTunnel, EQLine, EQWave, EQBars - winamp style). Just drag and drop the EQ on your app and it will animate any running sound inside your flash.</p><p>Related posts:<ol><li><a
href='http://blog.another-d-mention.ro/programming/create-professional-flex-components/' rel='bookmark' title='Permanent Link: Create professional Flex components'>Create professional Flex components</a></li><li><a
href='http://blog.another-d-mention.ro/programming/ho-to-install-alchemy/' rel='bookmark' title='Permanent Link: Ho-To: Install Alchemy'>Ho-To: Install Alchemy</a></li><li><a
href='http://blog.another-d-mention.ro/programming/create-flexas3-applications-for-mobile-devices/' rel='bookmark' title='Permanent Link: Create Flex/AS3 applications for Mobile Devices'>Create Flex/AS3 applications for Mobile Devices</a></li></ol></p>]]></content:encoded> <wfw:commentRss>http://blog.another-d-mention.ro/programming/flex-components-pack/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> </channel> </rss>
