In my recent post on Hopfield networks, we have seen that these networks suffer from the problem of spurious minima and that the deterministic nature of the dynamics of the network makes it difficult to escape from a local minimum. A possible approach to avoid this issue is to randomize the update rule. Intuitively, we want to … Continue reading Turn on the heating – from Hopfield networks to Boltzmann machines

# Month: March 2018

# Hopfield networks: practice

After having discussed Hopfield networks from a more theoretical point of view, let us now see how we can implement a Hopfield network in Python. First let us take a look at the data structures. We will store the weights and the state of the units in a class HopfieldNetwork. The weights are stored in … Continue reading Hopfield networks: practice

# Scripts in the bitcoin protocol

There is a point that we have touched upon several times but not yet properly explained - the role of scripts in the bitcoin protocol. We have seen that the public key and the signature are stored inside a bitcoin transaction in container data structures that were called scriptPubKey and scriptSig in the source code. … Continue reading Scripts in the bitcoin protocol

# Hopfield networks: theory

Having looked in some detail at the Ising model, we are now well equipped to tackle a class of neuronal networks that has been studied by several authors in the sixties, seventies and early eighties of the last century, but has become popular by an article [1] published by J. Hopfield in 1982. The idea … Continue reading Hopfield networks: theory

# On the road again – serializing and deserializing bitcoin transactions

In this post, I will show you how a bitcoin transaction presented in the raw format is to be interpreted and how conversely a bitcoin transaction stored in a C++ (and later Python) object can be converted into a hexadecimal representation (a process called serialization). Ultimately, the goal of this and subsequent posts will be … Continue reading On the road again – serializing and deserializing bitcoin transactions

# The Ising model and Gibbs sampling

In the last post in the series on AI and machine learning, I have described the Boltzmann distribution which is a statistical distribution for the states of a system at constant temperature. We will now look at one of the most important applications of this distribution to an actual model, the Ising model. This model was proposed … Continue reading The Ising model and Gibbs sampling

# Transactions in the bitcoin network

In my previous posts on the bitcoin protocol, I have described those objects that constitute participants - private and public keys and bitcoin addresses. Now we will look at those objects that represent actual transfers of bitcoins between these participants, namely at transactions. Essentially, a bitcoin transaction consists of two parts. First, a transaction contains … Continue reading Transactions in the bitcoin network

# The Boltzmann distribution

Boltzmann machines essentially learn statistical distributions. During the training phase, we present them a data set called the sample data that follows some statistical distribution. As the weights of the model are adjusted as part of the learning algorithm, the statistical model represented by the Boltzmann machine changes, and the learning phase is successful if … Continue reading The Boltzmann distribution

# Boltzmann machines, spin, Markov chains and all that

The image above displays a set of handwritten digits on the left. They look a bit like being sketched on paper by someone in a hurry and then scanned and digitalized, not very accurate but still mostly readable - but they are artificial, produced by a neuronal network, more precisely a so called restricted Boltzmann … Continue reading Boltzmann machines, spin, Markov chains and all that

# Keys in the bitcoin network: the public key

In my last post, we have looked in some detail at the private key - how it is generated and how it can be decoded and stored. Let us now do the same with the public key. Recall that a public key is simply a point on the elliptic curve SECP256K1 that is used by … Continue reading Keys in the bitcoin network: the public key