Most viewed recipes tagged "artificial_intelligence" but not "python"http://code.activestate.com/recipes/tags/artificial_intelligence-python/views/2017-07-15T00:46:59-07:00ActiveState Code RecipesUno (Text-Based) (Python)
2017-07-15T00:46:59-07:00Brandon Martinhttp://code.activestate.com/recipes/users/4194238/http://code.activestate.com/recipes/580811-uno-text-based/
<p style="color: grey">
Python
recipe 580811
by <a href="/recipes/users/4194238/">Brandon Martin</a>
(<a href="/recipes/tags/artificial_intelligence/">artificial_intelligence</a>, <a href="/recipes/tags/cards/">cards</a>, <a href="/recipes/tags/game/">game</a>, <a href="/recipes/tags/text_game/">text_game</a>, <a href="/recipes/tags/uno/">uno</a>).
</p>
<p>A text based recreation of the classic card game featuring functional AIs to play with. Some rules have been modified. User interface is text based, non-curses, using only simple python commands to draw it. </p>
Hopfield Artificial Neural Network (C++)
2010-11-14T06:32:53-08:00FB36http://code.activestate.com/recipes/users/4172570/http://code.activestate.com/recipes/577461-hopfield-artificial-neural-network/
<p style="color: grey">
C++
recipe 577461
by <a href="/recipes/users/4172570/">FB36</a>
(<a href="/recipes/tags/ai/">ai</a>, <a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/algorithms/">algorithms</a>, <a href="/recipes/tags/artificial_intelligence/">artificial_intelligence</a>, <a href="/recipes/tags/neural_network/">neural_network</a>).
Revision 2.
</p>
<p>(Discrete (Binary)) Hopfield Artificial Neural Network (ANN).</p>
<p>For more info see:</p>
<p><a href="http://en.wikipedia.org/wiki/Hopfield_net" rel="nofollow">http://en.wikipedia.org/wiki/Hopfield_net</a></p>
<p><a href="http://www.scholarpedia.org/article/Hopfield_network" rel="nofollow">http://www.scholarpedia.org/article/Hopfield_network</a></p>
Genetic Algorithm Neural Network in Python Source Code (Python)
2012-08-16T16:31:12-07:00David Adlerhttp://code.activestate.com/recipes/users/4182015/http://code.activestate.com/recipes/578241-genetic-algorithm-neural-network-in-python-source-/
<p style="color: grey">
Python
recipe 578241
by <a href="/recipes/users/4182015/">David Adler</a>
(<a href="/recipes/tags/artificial_intelligence/">artificial_intelligence</a>, <a href="/recipes/tags/neural/">neural</a>, <a href="/recipes/tags/neural_network/">neural_network</a>).
</p>
<p>A simple genetic algorithm neural network. </p>
Priority Queue (with deletion) (Python)
2013-12-08T21:12:55-08:00elazarhttp://code.activestate.com/recipes/users/4187847/http://code.activestate.com/recipes/578780-priority-queue-with-deletion/
<p style="color: grey">
Python
recipe 578780
by <a href="/recipes/users/4187847/">elazar</a>
(<a href="/recipes/tags/artificial_intelligence/">artificial_intelligence</a>, <a href="/recipes/tags/heap/">heap</a>, <a href="/recipes/tags/heapq/">heapq</a>, <a href="/recipes/tags/priority_queue/">priority_queue</a>, <a href="/recipes/tags/queue/">queue</a>).
Revision 5.
</p>
<p>Based on the interface defined in aima-python
<a href="http://aima-python.googlecode.com/svn/trunk/utils.py" rel="nofollow">http://aima-python.googlecode.com/svn/trunk/utils.py</a></p>
<p>Yields better performance.</p>
State Machine Framework (AI) (Python)
2013-09-12T19:50:06-07:00Matt Joneshttp://code.activestate.com/recipes/users/4182764/http://code.activestate.com/recipes/578656-state-machine-framework-ai/
<p style="color: grey">
Python
recipe 578656
by <a href="/recipes/users/4182764/">Matt Jones</a>
(<a href="/recipes/tags/artificial_intelligence/">artificial_intelligence</a>, <a href="/recipes/tags/state_machine/">state_machine</a>).
</p>
<p>A simple state machine framework that could be used for AI or long processing operations. A simple example is provided as well.</p>
<p>Python 3.2 required</p>
Artificial Neuroglial Network (ANGN) (Python)
2012-10-02T16:18:36-07:00David Adlerhttp://code.activestate.com/recipes/users/4182015/http://code.activestate.com/recipes/578242-artificial-neuroglial-network-angn/
<p style="color: grey">
Python
recipe 578242
by <a href="/recipes/users/4182015/">David Adler</a>
(<a href="/recipes/tags/artificial_intelligence/">artificial_intelligence</a>, <a href="/recipes/tags/genetic_algorithm/">genetic_algorithm</a>, <a href="/recipes/tags/genetic_algorithms/">genetic_algorithms</a>, <a href="/recipes/tags/neural/">neural</a>, <a href="/recipes/tags/neural_networks/">neural_networks</a>).
Revision 5.
</p>
<p>This is an attempt at emulating the algorithm from these scientific articles:</p>
<ol>
<li><a href="http://www.hindawi.com/journals/cmmm/2012/476324/">2011 - Artificial Astrocytes Improve Neural Network Performance</a></li>
<li><a href="http://www.plosone.org/article/info%3Adoi%2F10.1371%2Fjournal.pone.0019109">2012 - Computational Models of Neuron-Astrocyte Interactions Lead to Improved Efficacy in the Performance of Neural Networks</a></li>
</ol>
<p>The objective of the program is to train a neural network to classify the four inputs (the dimensions of a flower) into one of three categories (three species of flower), (taken from the <a href="http://archive.ics.uci.edu/ml/datasets/Iris">Iris Data Set</a> from the UCI Machine Learning Repository). This program has two learning phases: the first is a genetic algorithm (supervised), the second is a neuroglial algorithm (unsupervised). This ANGN is a development of a previous program only consisting of a genetic algorithm which can be found <a href="http://code.activestate.com/recipes/578241-genetic-algorithm-neural-network-in-python-source-/">here</a>.</p>
<p>The second phase aims to emulate astrocytic interaction with neurons in the brain. The algorithm is based on two axioms: a) astrocytes are activated by persistent neuronal activity b) astrocytic effects occur over a longer time-scale than neurons. Each neuron has an associated astrocyte which counts the number of times its associated neuron fires (+1 for active -1 for inactive). If the counter reaches its threshold (defined as <code>Athresh</code>) the astrocyte is activated and for the next x iterations (defined as <code>Adur</code>) the astrocyte modifies the incoming weights to that particular neuron. If the counter reached a maximum due to persistent firing the incoming weights are increase by 25% for the proceeding <code>Adur</code> iterations; conversely if the counter reached a minimum due to persistent lack of firing the weights are decreased by 50% for the following <code>Adur</code> iterations). For a detailed description of the algorithm see the linked articles. For a general understanding of how this program was coded look at the pseudo-code/schematic <a href="http://commons.wikimedia.org/wiki/File:ANGN_schematic.png">here</a>.</p>
<p>Any comments for improvements are welcome. There are several issues in this program which require addressing, please scroll down below code to read about these issues.</p>
Hopfield Artificial Neural Network (C++)
2016-07-03T21:58:49-07:00Jay ballerhttp://code.activestate.com/recipes/users/4194368/http://code.activestate.com/recipes/580688-hopfield-artificial-neural-network/
<p style="color: grey">
C++
recipe 580688
by <a href="/recipes/users/4194368/">Jay baller</a>
(<a href="/recipes/tags/ai/">ai</a>, <a href="/recipes/tags/algorithm/">algorithm</a>, <a href="/recipes/tags/algorithms/">algorithms</a>, <a href="/recipes/tags/artificial_intelligence/">artificial_intelligence</a>, <a href="/recipes/tags/neural_network/">neural_network</a>).
</p>
<p>(Discrete (Binary)) Hopfield Artificial Neural Network (ANN).</p>
<p>For more info see:</p>
<p><a href="http://en.wikipedia.org/wiki/Hopfield_net" rel="nofollow">http://en.wikipedia.org/wiki/Hopfield_net</a></p>
<p><a href="http://www.scholarpedia.org/article/Hopfield_network" rel="nofollow">http://www.scholarpedia.org/article/Hopfield_network</a></p>