Amar Merabti · notebook FR
← Back to the workshop

Workshop · two course tools, put back to work

Two course tools, to try right here

Do you understand a neural network better once you have set its weights yourself?

01 · Neural network

Tune it until it computes a XOR

During the machine learning course of my first master's year, I needed to check threshold neural networks by hand. I wrote a small Tkinter tool to build them with the mouse and follow the forward pass, neuron by neuron. Here it is in the browser, with the original computation: each neuron holds activation(Σ weight × input + bias), and the default activation is a threshold — 1 if the sum is positive, 0 otherwise.

XOR is the classic example: no single neuron can produce it, you need two in a hidden layer. The four input combinations are checked live under the network.

Fig. 1 — Add layers and neurons, connect them by tapping two neurons in different layers, set weights and biases: the forward pass is recomputed on every move. “Load the XOR” uses the examples/xor.json file from the repository, and the export writes the same format, which the original Tkinter application can read back.
02 · Argumentation

Who wins the debate?

A Dung argumentation framework says nothing about what the arguments mean: it only knows who attacks whom. The interesting questions come next. A set of arguments is conflict-free if it does not attack itself, complete if it defends all its members and contains everything it defends, and stable if it attacks everything it leaves out.

The solver below is the one from my first-year master's project, ported as is: it enumerates every subset and tests those properties. An argument is credulously accepted if it belongs to at least one extension, skeptically accepted if it belongs to all of them.

Fig. 2 — Tap one argument then another to add or remove an attack. The odd cycle has no stable extension at all: it is the counter-example that justifies studying several semantics.