Neural Organism for Real-world Adaptation - OfficinaTurini

Go to content
NORA
Neural Organism for Real-world Adaptation
Created: 23 September 2026

Difficulty project:

Premessa. Questo testo nasce per raccontare il progetto senza chiedere al lettore di conoscere reti neurali, DSP o architetture embedded. Prima vengono le immagini e le storie; i termini tecnici arrivano soltanto quando servono davvero.

Fin da ragazzo sono stato appassionato di molte scienze, ma c’è una cosa che mi ha sempre affascinato più delle altre: l’incredibile efficienza dei meccanismi naturali.

Pensate, per esempio, al volo di un insetto.

Una mosca parte dal tavolo, schiva una mano, cambia direzione in una frazione di secondo, evita un vetro — quasi sempre — trova qualcosa da mangiare e, con pochissima energia, continua tranquillamente la sua giornata.

Oppure pensate a uno dei suoi cacciatori.

Un uccello vede qualcosa muoversi, ne intuisce la traiettoria, corregge il proprio volo, tiene conto del vento, degli ostacoli, della propria velocità e nel frattempo evita di schiantarsi contro un albero.

Tutto questo ci sembra normale.

Talmente normale che quasi non ci facciamo più caso.

Il problema nasce quando proviamo a costruirne uno.

Facciamo allora un piccolo esperimento mentale.

Immaginate di essere un bravissimo ingegnere, laureato nella migliore università del mondo.

Avete un laboratorio fantastico, strumenti di ogni genere e, soprattutto, un finanziatore particolarmente generoso.

Insomma, avete soldi.

Molti soldi.

Sì, capisco perfettamente cosa state pensando.

Scappare con i soldi.

Ma no, purtroppo non vale.

Oltretutto vi complichereste la vita e probabilmente vi verrebbero a cercare.

Il compito è un altro.

Dovete costruire qualcosa di nuovo.

Non un’automobile.

Non un drone che vola per venti minuti seguendo un percorso programmato.

Dovete costruire un essere artificiale capace di vivere autonomamente nel nostro ambiente.

Deve muoversi.

Deve capire, almeno un po’, ciò che gli succede intorno.

Deve evitare i pericoli.

Deve procurarsi l’energia necessaria.

Deve reagire quando qualcosa cambia.

E, possibilmente, deve riuscire a farlo senza che qualcuno gli tenga continuamente la mano.

In poche parole:

deve vivere.

Vi concedo anche un enorme vantaggio.

Non vi chiedo di costruirlo piccolo come una mosca, perché a quel punto probabilmente il nostro generoso finanziatore comincerebbe a pentirsi seriamente dell’investimento.

Facciamolo grande.

Diciamo… un’aquila.

Un’aquila artificiale.

Grande abbastanza da poterci mettere dentro batterie, motori, computer, telecamere, sensori e tutto ciò che ci serve.

Sembrerebbe più facile.

Sembrerebbe.

Perché il nostro ambiente — quello che con una parola rassicurante chiamiamo “natura” — è in realtà un posto terribilmente complicato.

Cambia continuamente.

Fa caldo, poi freddo.

C’è luce, poi buio.

Un ostacolo che ieri non esisteva oggi è proprio lì davanti.

Il vento cambia.

Un sensore si sporca.

Una batteria invecchia.

Un motore rende meno del previsto.

E soprattutto succedono cose che il progettista non aveva previsto.

A questo punto potremmo affrontare il problema nel modo più classico.

Scriviamo delle regole.

Se succede questo, fai quello.

Se compare un ostacolo, gira a destra.

A meno che a destra non ci sia qualcos’altro.

Allora gira a sinistra.

Ma se a sinistra c’è vento forte, rallenta.

A meno che la batteria sia quasi scarica.

In quel caso cerca una sorgente di energia.

Però se durante la ricerca…

E qui cominciano i guai.

Perché dopo un po’ il nostro programma assomiglia più al regolamento fiscale di una nazione particolarmente creativa che al cervello di un’aquila.

Il mondo reale possiede una pessima abitudine: trova sempre la situazione che non avevamo previsto.

Ed è proprio per affrontare problemi di questo genere che, ormai da molti decenni, utilizziamo un approccio diverso.

Le reti neurali artificiali.

Il nome può sembrare complicato, ma l’idea di base non lo è affatto.

Abbiamo osservato che in natura moltissimi problemi non vengono risolti attraverso un gigantesco libro di regole scritto in anticipo.

Vengono risolti da sistemi composti da un enorme numero di elementi molto semplici che lavorano insieme.

Noi abbiamo preso ispirazione da quell’idea e ne abbiamo costruito una versione estremamente semplificata.

Una rete neurale artificiale, in fondo, è un programma.

Riceve delle informazioni in ingresso.

Per esempio:

quanto sono inclinato?

quanto velocemente mi sto muovendo?

c’è qualcosa davanti?

quanto è carica la batteria?

E produce delle risposte.

Accelera.

Rallenta.

Gira.

Fermati.

Tra gli ingressi e le uscite ci sono quelli che chiamiamo “neuroni artificiali”, organizzati in strati e collegati tra loro.

Non dobbiamo necessariamente spiegare alla rete, una per una, tutte le regole del mondo.

Possiamo invece mostrarle degli esempi e insegnarle gradualmente a comportarsi.

Questo processo viene normalmente chiamato training.

In pratica possiamo immaginarlo così:

“Quando ti trovi in una situazione come questa, una buona risposta assomiglia a questa.”

La rete prova.

Sbaglia.

Corregge un pochino le proprie connessioni.

Riprova.

E dopo moltissime prove può diventare sorprendentemente brava.

Problema risolto?

Naturalmente no.

Perché, come ricordava Leopardi, la natura può essere una discreta matrigna.

Il mondo cambia.

Una rete che ieri funzionava perfettamente potrebbe cominciare lentamente a funzionare peggio.

E allora potremmo pensare a qualcosa di più interessante.

Supponiamo che qualcuno controlli continuamente come sta andando la nostra rete.

Finché tutto funziona bene, non tocca nulla.

Ma quando si accorge che le prestazioni stanno peggiorando, raccoglie ciò che è successo e prova ad addestrarla di nuovo.

Un po’ come dire:

“Cara aquila, il mondo è cambiato. Vediamo se possiamo imparare qualcosa di nuovo.”

Ma potrebbe non bastare.

Può succedere che il problema non sia più soltanto ciò che la rete ha imparato.

Potrebbe essere proprio la rete stessa a non essere più adatta.

Troppo semplice.

Pochi neuroni.

Poche connessioni.

Una struttura che andava benissimo ieri ma non è più sufficiente oggi.

Ed è qui che nasce l’idea al centro di questo progetto.

Se il nuovo addestramento non basta, perché non permettere al sistema di modificare anche la propria struttura?

Aggiungere neuroni.

Creare nuovi strati.

Provare una rete diversa.

Valutarla.

E soltanto se funziona davvero meglio, usarla al posto della precedente.

Naturalmente bisogna stare attenti.

Perché c’è un modo molto semplice per costruire una rete più potente:

farla sempre più grande.

Ma sarebbe come risolvere ogni problema automobilistico montando un motore sempre più grosso.

Prima o poi magari il motore non entra più nel cofano.

Quindi il nostro sistema deve imparare anche un’altra cosa.

Una rete più grande non è automaticamente una rete migliore.

Se per ottenere un miglioramento minuscolo devo raddoppiare il lavoro del processore, raddoppiare la memoria e consumare molta più energia, forse il gioco non vale la candela.

E allora la nostra aquila artificiale deve imparare a farsi una domanda piuttosto sensata:

“Questa nuova testa è davvero migliore della vecchia, oppure è soltanto più grossa?”

Ma a questo punto viene quasi spontanea una domanda ancora più interessante.

Se una rete può crescere quando il mondo diventa difficile…

può anche diventare più piccola quando scopre che tutta quella complessità non serve più?

Perché in natura succede continuamente.

Un organismo non trasporta inutilmente ciò che non gli serve.

L’energia costa.

Il peso costa.

La complessità costa.

E così abbiamo provato ad aggiungere anche questa possibilità.

Dopo un lungo periodo di stabilità, il sistema può tentare prudentemente di costruire una versione più semplice di se stesso.

Toglie qualcosa.

Conserva per quanto possibile ciò che ha imparato.

La prova.

La osserva.

E se scopre che la versione più piccola continua a comportarsi altrettanto bene, la promuove.

Altrimenti la butta via e torna tranquillamente alla precedente.

Nessun dramma.

Nessun salto nel vuoto.

A questo punto siamo arrivati a qualcosa di curioso.

Non abbiamo più soltanto una rete neurale che viene addestrata.

Abbiamo un piccolo sistema che osserva se stesso.

Si accorge quando non funziona più abbastanza bene.

Prova a imparare di nuovo.

Se necessario prova a crescere.

Quando può, prova a semplificarsi.

Confronta il risultato con ciò che aveva prima.

E decide se vale davvero la pena cambiare.

Tutto questo non gira su qualche enorme centro di calcolo.

Gira su un piccolo processore embedded progettato molti anni fa.

Ed è proprio questo che rende l’esperimento interessante.

Perché il nostro obiettivo non era costruire la rete neurale più grande possibile.

Era vedere se fosse possibile costruire qualcosa che, pur disponendo di risorse limitate, riuscisse a fare una cosa molto più simile a ciò che vediamo continuamente in natura:

adattarsi.

Non sappiamo se la nostra aquila artificiale imparerebbe mai davvero a vivere.

Probabilmente ci farebbe perdere parecchi soldi prima ancora di riuscire a decollare.

Ma una piccola parte del problema possiamo cominciare ad affrontarla.

Possiamo provare a costruire un sistema capace di cambiare quando il mondo cambia.

E magari, ogni tanto, capace perfino di scoprire che per fare bene il proprio lavoro non ha bisogno di diventare più grande.

Ha solo bisogno di diventare migliore.
    Costruiamo il cervello della nostra aquila
    Bene.

    A questo punto abbiamo un’aquila artificiale.

    O meglio, abbiamo deciso di costruirla.

    Per il momento probabilmente è ancora sparsa sul tavolo del laboratorio sotto forma di motori, batterie, fili, telecamere e una quantità imprecisata di viti che, come succede sempre, alla fine saranno almeno tre in più rispetto ai fori disponibili.

    Ma prima o poi dovremo affrontare il problema più difficile.

    Dobbiamo darle un cervello.

    E qui conviene chiarire subito una cosa.

    Non stiamo cercando di costruire un cervello umano.

    Non ci interessa che la nostra aquila legga Shakespeare, risolva integrali o discuta della propria esistenza.

    Ci basta molto meno.

    Vogliamo che sappia fare bene il proprio mestiere.

    Volare.

    Evitare ostacoli.

    Reagire a ciò che accade.

    Tornare a casa.

    Possibilmente senza infilarsi dentro una finestra chiusa.

    Sembra poco.

    In realtà è già moltissimo.

    Partiamo dalle cose semplici

    Supponiamo che la nostra aquila abbia alcuni sensori.

    Un sensore ci dice se è inclinata.

    Uno misura quanto sta accelerando.

    Una telecamera ci racconta, in qualche modo, ciò che succede davanti.

    Un altro sensore ci dice quanta energia rimane nella batteria.

    Potremmo avere decine, centinaia o migliaia di numeri che descrivono, istante per istante, la situazione.

    Questi numeri sono gli occhi, le orecchie e l’equilibrio della nostra macchina.

    Dall’altra parte abbiamo invece le cose che può fare.

    Girare.

    Salire.

    Scendere.

    Accelerare.

    Rallentare.

    Quindi il problema, visto da molto lontano, diventa quasi banale:

    dati in ingresso, decisioni in uscita.

    In mezzo dobbiamo costruire qualcosa che impari a trasformare i primi nelle seconde.

    Quella cosa sarà la nostra rete neurale.

    Un cervello piccolo, almeno all’inizio

    Qui nasce una tentazione molto comune.

    Se una rete con pochi neuroni funziona bene, allora una rete con molti neuroni funzionerà meglio.

    E se molti sono meglio, moltissimi saranno fantastici.

    È la stessa filosofia con cui si potrebbe progettare un tostapane utilizzando il motore di una nave.

    Probabilmente funzionerebbe.

    Rimarrebbero però alcuni dettagli da sistemare.

    Per esempio il consumo.

    Lo spazio.

    Il costo.

    E il fatto che la cucina forse non sopravviverebbe all’esperimento.

    Nel nostro caso abbiamo deciso di partire esattamente dall’idea opposta.

    Cominciamo con una rete piccola.

    La più piccola che abbia ragionevolmente la possibilità di svolgere il compito.

    Se basta, abbiamo vinto.

    Se non basta, crescerà.

    Questo dettaglio è importante perché il cervello della nostra aquila non gira in un enorme computer da laboratorio.

    Gira su un processore embedded con risorse finite.

    Finite davvero.

    La memoria non è infinita.

    Il tempo per prendere una decisione non è infinito.

    L’energia non è infinita.

    Ogni neurone aggiunto costa qualcosa.

    E quando un animale sta volando, qualche millisecondo di troppo può essere più interessante di quanto sembri.

    Ma chi decide se il cervello sta funzionando?

    Qui comincia la parte divertente.

    Una rete neurale, una volta addestrata, potrebbe essere lasciata tranquillamente al proprio lavoro.

    Riceve i dati.

    Fa i propri calcoli.

    Produce una risposta.

    Fine.

    Noi però abbiamo aggiunto qualcuno che la osserva.

    Una specie di piccolo controllore.

    Non gli interessa sapere come la rete arriva alla risposta.

    Gli interessa una domanda molto più semplice:

    sta ancora facendo bene il proprio lavoro?

    Se la risposta è sì, non succede niente.

    Ed è importante.

    Un sistema autonomo ben progettato dovrebbe avere una grande capacità che spesso viene sottovalutata:

    saper stare fermo quando tutto funziona.

    Cambiare continuamente qualcosa solo perché possiamo farlo è un ottimo sistema per creare problemi che prima non esistevano.

    Quindi il nostro controllore guarda.

    Aspetta.

    Accumula esperienza.

    E finché le cose vanno bene lascia stare il cervello dell’aquila.

    Poi un giorno qualcosa cambia

    Passa del tempo.

    Un motore invecchia.

    Il peso cambia.

    Il vento è diverso.

    La telecamera non vede più esattamente come prima.

    Oppure semplicemente il nostro animale artificiale incontra situazioni che durante l’addestramento non aveva mai visto.

    Le prestazioni iniziano a peggiorare.

    Non abbastanza da precipitare immediatamente, speriamo.

    Ma abbastanza da far scattare un campanello.

    A questo punto il sistema non butta via subito la rete.

    Prima fa la cosa meno invasiva.

    Prova a insegnarle di nuovo.

    Negli ultimi minuti, ore o giorni ha raccolto nuovi dati.

    Ha visto situazioni nuove.

    Possiede quindi nuovo materiale con cui allenarsi.

    La rete viene nuovamente addestrata.

    E poi viene provata.

    Se torna a funzionare bene, problema risolto.

    La nostra aquila ha imparato qualcosa senza dover cambiare cervello.

    E se imparare non basta?

    Qui arriviamo al passaggio che ha dato origine a buona parte di questo progetto.

    Supponiamo che il nuovo addestramento non basti.

    Possiamo insistere.

    Allenare ancora.

    E ancora.

    E ancora.

    Prima o poi però è ragionevole farsi una domanda diversa:

    e se il problema non fosse ciò che la rete ha imparato, ma ciò che la rete è in grado di imparare?

    Forse il suo cervello è diventato troppo piccolo per il nuovo mondo in cui si trova.

    È come pretendere di scrivere un’enciclopedia continuando ad aggiungere note sui margini di un biglietto da visita.

    A un certo punto lo spazio finisce.

    Ed è allora che il nostro sistema prova a costruire una rete un po’ più grande.

    Non cento reti.

    Non mille.

    Non tutte le possibili combinazioni di neuroni dell’universo.

    Una.

    La successiva.

    Secondo regole molto precise.

    Aggiunge qualche neurone.

    Oppure, se necessario, aggiunge uno strato.

    E riprova.

    Ma il vecchio cervello non si butta via

    Questo è uno dei principi a cui abbiamo tenuto di più.

    Immaginate che durante il volo qualcuno dica alla nostra aquila:

    “Ho costruito un cervello nuovo. Da questo momento usiamo quello e speriamo bene.”

    Direi che anche l’aquila potrebbe avere qualcosa da obiettare.

    Noi facciamo l’opposto.

    Il vecchio cervello rimane al comando.

    Sempre.

    Il nuovo viene costruito accanto.

    Lo chiamiamo, molto banalmente, il candidato.

    Il candidato studia.

    Viene addestrato.

    Viene esaminato.

    E poi gli viene permesso di osservare la realtà senza comandare nulla.

    Riceve gli stessi dati del cervello attivo e dice cosa avrebbe fatto.

    Ma nessuno gli dà ancora le chiavi dell’aquila.

    È una specie di copilota in prova.

    Può parlare.

    Non può toccare i comandi.

    “Sei davvero migliore?”

    A questo punto potremmo limitarci a confrontare le risposte dei due cervelli e scegliere quello che sbaglia meno.

    Ma c’è un problema.

    Supponiamo che il candidato sia migliore dello 0,1%.

    Fantastico.

    Peccato che per ottenere quello 0,1% abbia bisogno del doppio della memoria e impieghi il doppio del tempo per prendere ogni decisione.

    Lo promuoviamo?

    Noi abbiamo deciso di non rispondere automaticamente di sì.

    Perché nel mondo reale essere migliori costa.

    Un cervello più grande richiede più memoria.

    Più calcoli.

    Più tempo.

    Spesso più energia.

    E la nostra aquila non vola collegata alla presa di casa.

    Quindi non chiediamo soltanto:

    “È migliore?”

    Chiediamo:

    “È abbastanza migliore da giustificare ciò che costa?”

    Nessun voto finale

    Qui abbiamo fatto una scelta un po’ particolare.

    Avremmo potuto dare un voto a ogni rete.

    Per esempio:

    prestazioni 8,

    velocità 7,

    memoria 6,

    consumo 9.

    Poi fare una bella media e decretare il vincitore.

    Comodo.

    Ma anche pericoloso.

    Perché mettendo tutto dentro un unico numero si rischia di nascondere cose importanti.

    Una rete velocissima ma incapace di svolgere correttamente il proprio compito non è una buona rete.

    Una rete meravigliosa che non entra nella memoria del processore non è una buona rete.

    Una rete leggermente migliore che impiega tre volte più tempo a rispondere potrebbe non essere una buona rete.

    Quindi abbiamo preferito mantenere separate le domande.

    È abbastanza precisa?

    Sta dentro la memoria?

    È abbastanza veloce?

    Funziona anche nella versione numerica che utilizzeremo realmente sul processore?

    Il miglioramento è significativo?

    Il costo aggiuntivo è ragionevole?

    Ogni domanda deve avere la propria risposta.

    Niente voto magico.

    Il candidato entra in prova

    Se supera tutti questi controlli, il nuovo cervello non viene ancora proclamato vincitore.

    Entra in prova.

    Per un po’ il sistema continua a osservarlo.

    Se tutto va bene, diventa il nuovo cervello ufficiale.

    Ma il precedente non viene immediatamente distrutto.

    Rimane lì.

    Pronto.

    Perché anche i migliori esami non riescono a prevedere tutto ciò che può succedere nel mondo reale.

    Se durante il periodo di prova il nuovo cervello comincia a comportarsi male, il sistema torna indietro.

    Niente riavvio da zero.

    Niente panico.

    Il vecchio cervello riprende il controllo.

    È un principio molto semplice:

    prima di buttare via qualcosa che funzionava, assicurati molto bene che ciò che lo sostituisce funzioni davvero.

    Vale per le reti neurali.

    E probabilmente vale anche per parecchie altre cose nella vita.

    Fin qui abbiamo insegnato all’aquila a crescere

    A questo punto il sistema sa fare qualcosa di interessante.

    Parte con un cervello piccolo.

    Lo utilizza.

    Se necessario lo riaddestra.

    Se non basta, ne prova uno più grande.

    Lo confronta con quello precedente.

    E lo adotta soltanto se il vantaggio è reale.

    Potremmo fermarci qui.

    Ma comparirebbe lentamente un problema.

    Ogni volta che il mondo diventa difficile il cervello può crescere.

    E quando il mondo torna semplice?

    Niente.

    Rimarrebbe grande.

    Per sempre.

    È il classico problema del garage.

    All’inizio ci metti l’automobile.

    Poi aggiungi uno scaffale.

    Poi un tavolo.

    Poi alcune scatole.

    Dopo qualche anno l’automobile dorme fuori e tu non ricordi esattamente perché conservi ancora un modem del 1998.

    La complessità tende ad accumularsi.

    Abbiamo quindi deciso di insegnare al nostro sistema anche a fare pulizia.

    Ogni tanto proviamo a togliere qualcosa

    Se l’aquila funziona bene da molto tempo, non sta affrontando situazioni difficili e non ci sono problemi in corso, il sistema può fare un tentativo.

    Costruisce una versione leggermente più piccola del cervello attuale.

    Non distrugge quella grande.

    Naturalmente.

    Sarebbe troppo facile.

    Prende invece il cervello esistente e cerca di capire quali parti sembrano contribuire meno al risultato.

    Poi costruisce una rete più piccola conservando, per quanto possibile, ciò che era già stato imparato.

    Non è un trapianto perfetto.

    Togliere neuroni significa inevitabilmente cambiare qualcosa.

    Ma è meglio che partire da un cervello completamente vuoto.

    Possiamo immaginarlo come un trasloco.

    Se passiamo da una casa di cinque stanze a una di quattro, non buttiamo via tutto e ricompriamo i mobili.

    Cerchiamo di portarci dietro ciò che serve davvero.

    E poi la rete piccola deve dimostrare di meritarselo

    A questo punto accade una cosa molto bella.

    Non abbiamo bisogno di inventare nuove regole.

    La rete più piccola viene trattata esattamente come qualsiasi altro candidato.

    Viene addestrata.

    Provata.

    Confrontata.

    Osservata.

    Solo che questa volta parte con un grande vantaggio:

    costa meno.

    Quindi se riesce a mantenere praticamente le stesse prestazioni usando meno memoria, meno calcoli e meno tempo, diventa automaticamente molto interessante.

    È un candidato che può dire:

    “Faccio praticamente la stessa cosa, ma sono più piccolo.”

    Difficile trovare un argomento migliore.

    Se funziona, viene promosso.

    Se non funziona, viene scartato.

    Il vecchio cervello continua tranquillamente a lavorare.

    Però non deve mettersi a dieta ogni cinque minuti

    A questo punto qualcuno potrebbe giustamente immaginare una situazione piuttosto comica.

    La rete cresce.

    Poi si restringe.

    Poi cresce.

    Poi si restringe.

    Una specie di dieta pre-estate permanente.

    Abbiamo quindi aggiunto una cosa fondamentale:

    la pazienza.

    Il sistema può tentare di diventare più piccolo soltanto dopo un lungo periodo di stabilità.

    Non basta che tutto funzioni bene per qualche istante.

    Deve andare bene abbastanza a lungo.

    Inoltre, dopo un tentativo fallito, deve aspettare parecchio prima di riprovarci.

    E se durante il tentativo di semplificazione compare un vero problema?

    La dieta viene immediatamente sospesa.

    Prima viene la sopravvivenza.

    Poi penseremo alla linea.

    Perché proprio aspettare così tanto?

    Qui vale la pena fermarsi un momento, perché una delle prime domande che ci si può fare è:

    “Chi ha deciso quanto bisogna aspettare?”

    La risposta più onesta è:

    noi.

    Ma non tirando un dado.

    Abbiamo scelto valori volutamente prudenti.

    Se il mondo che utilizziamo per il test compie un ciclo completo in 12.000 osservazioni, chiedere 24.000 osservazioni stabili significa aspettarne almeno due.

    L’idea è semplice.

    Non vogliamo scambiare una breve fase tranquilla per una vera stabilità.

    Allo stesso modo il cervello attivo deve avere una certa età prima di poter essere messo a dieta.

    E dopo un tentativo bisogna aspettare ancora prima di ripeterlo.

    Sono valori iniziali.

    Non leggi di natura.

    Uno degli scopi delle prove lunghe che stiamo effettuando è proprio capire se questi tempi siano ragionevoli.

    Se scopriremo che il sistema aspetta troppo, li accorceremo.

    Se scopriremo che cambia troppo spesso idea, li aumenteremo.

    È così che dovrebbe funzionare un parametro ingegneristico:

    non perché “suona bene”, ma perché possiamo spiegare quale problema cerca di evitare e poi verificare sperimentalmente se lo evita davvero.

    Il nostro cervello ha anche memoria

    Non nel senso poetico del termine.

    Quello arriverà forse in un altro progetto.

    Qui parliamo di una cosa molto più pratica.

    Il processore può spegnersi.

    La batteria può finire.

    Qualcuno può staccare l’alimentazione.

    Un aggiornamento può richiedere un riavvio.

    E al ritorno non vogliamo sentirgli dire:

    “Buongiorno, chi sono?”

    Quindi il sistema salva continuamente le informazioni necessarie per ricostruire la propria situazione.

    Qual è il cervello attivo.

    Quale era quello precedente.

    Se ce n’è uno nuovo in addestramento.

    A che punto era arrivato.

    Quali strutture ha già provato.

    Quali hanno fallito.

    Se stava tentando di diventare più piccolo.

    Quanto tempo deve ancora aspettare prima di riprovarci.

    E soprattutto salva tutto in modo prudente.

    Prima scrive le cose nuove.

    Poi, soltanto quando è sicuro che esistano davvero, aggiorna il cartello che dice:

    “Da questo momento questa è la versione ufficiale.”

    È una precauzione banale fino al giorno in cui manca la corrente nel momento sbagliato.

    Dopodiché smette immediatamente di sembrare banale.

    E se manca corrente proprio durante un cambio di cervello?

    Era una domanda troppo divertente per non provarla.

    Abbiamo quindi simulato riavvii durante le varie fasi.

    Durante l’addestramento.

    Durante un cambio di rete.

    Dopo la promozione.

    Durante il periodo di prova.

    Il sistema al ritorno controlla ciò che è stato realmente salvato e ricostruisce i ruoli.

    Non si fida ciecamente dell’ultimo pensiero che aveva prima dello spegnimento.

    Si fida di ciò che trova realmente scritto.

    In altre parole:

    non dice

    “mi sembrava di aver promosso quella rete”.

    Controlla.

    Una qualità che, a pensarci bene, potrebbe essere utile anche agli esseri umani.

    Tutto questo gira dove?

    A questo punto potremmo immaginare una bella macchina piena di schede grafiche.

    Ventole.

    Kilowatt.

    Un armadio da centro di calcolo.

    Invece no.

    Il protagonista del nostro esperimento è un ADSP-BF518.

    Un processore embedded progettato parecchi anni fa.

    Non possiede risorse infinite.

    Anzi.

    Una delle sue caratteristiche più simpatiche è che ci concede appena 4 kilobyte di stack.

    Quattro.

    Non quattro megabyte.

    Kilobyte.

    È una quantità che insegna rapidamente l’umiltà.

    Non possiamo permetterci di creare enormi oggetti temporanei aspettandoci che il computer “ci pensi lui”.

    Dobbiamo decidere dove mettere ogni cosa.

    Il codice che deve correre velocissimo viene tenuto vicino al processore.

    Le strutture di controllo hanno un’altra area.

    I dati più grandi vengono messi nella memoria esterna.

    Perfino i test, quando non servono durante il normale funzionamento, vengono spostati lontano dalla memoria più preziosa.

    È un limite fastidioso.

    Ma rende anche l’esperimento molto più interessante.

    Perché ci costringe a chiederci continuamente:

    questa cosa serve davvero?

    E il cervello parla

    Durante le prove ci siamo accorti che mancava qualcosa.

    Se lasci il sistema funzionare per ore, prima o poi vuoi sapere cosa sta facendo.

    Ma non vuoi interromperlo.

    Non vuoi aprire file.

    Non vuoi costringerlo a salvare qualcosa.

    Vuoi soltanto bussare alla porta e chiedere:

    “Ehi, tutto bene?”

    Abbiamo quindi aggiunto il comando più sofisticato dell’intero progetto:

    ?

    Premendo un punto interrogativo sulla comunicazione seriale, il sistema risponde con poche informazioni.

    Quanto tempo ha lavorato.

    Qual è il cervello attivo.

    Quanti neuroni contiene.

    A che generazione siamo.

    Se sta addestrando qualcosa.

    Se sta crescendo.

    Se sta tentando di ridursi.

    Quanta memoria rimane libera.

    Poi torna immediatamente al proprio lavoro.

    È probabilmente la parte meno tecnologicamente impressionante del progetto.

    Ed è una delle mie preferite.

    Perché trasforma un esperimento di molte ore in qualcosa che ogni tanto puoi semplicemente salutare.

    “Come va?”

    E adesso lo lasciamo vivere

    Arrivati qui, la cosa più interessante che possiamo fare è smettere di toccarlo.

    Abbiamo verificato separatamente i meccanismi.

    Abbiamo costretto il sistema a crescere.

    Lo abbiamo costretto a ridursi.

    Abbiamo simulato reti migliori, reti peggiori, cambi di struttura, riavvii, rifiuti e ritorni alla versione precedente.

    Abbiamo controllato perfino che dopo tutte queste operazioni la memoria disponibile tornasse esattamente al punto di partenza.

    Ma queste sono prove.

    Il mondo vero comincia quando lasciamo andare il sistema per ore.

    Milioni di osservazioni.

    Cambiamenti.

    Periodi tranquilli.

    Periodi difficili.

    Tentativi riusciti.

    Tentativi falliti.

    E a quel punto la domanda non sarà più:

    “Il programma sa crescere?”

    Sappiamo già che può farlo.

    Neppure:

    “Sa diventare più piccolo?”

    Anche questo lo abbiamo già provato.

    La domanda interessante diventa:

    che cosa sceglierà di fare quando nessuno glielo ordina?

    Continuerà a crescere?

    Proverà continuamente a dimagrire?

    Oscillerà?

    Oppure, dopo un po’, troverà da solo una specie di dimensione naturale?

    Una zona in cui il suo cervello è abbastanza grande per affrontare il proprio mondo, ma non più grande del necessario?

    Mentre sto scrivendo queste righe, il piccolo processore sul banco sta facendo esattamente questo esperimento.

    Lavora.

    Osserva.

    Impara.

    Ogni tanto cambia idea.

    Noi, per una volta, cerchiamo di non disturbarlo.

    Tra qualche ora andremo a vedere cosa ha combinato.
    Introduction. This text was written to tell the story of the project without requiring the reader to know anything about neural networks, DSPs, or embedded architectures. Images and stories come first; technical terms appear only when they are really needed.

    Ever since I was young I have been fascinated by many branches of science, but one thing has always impressed me more than anything else: the extraordinary efficiency of natural mechanisms.

    Think, for example, about the flight of an insect.

    A fly takes off from a table, dodges a hand, changes direction in a fraction of a second, avoids a window — most of the time — finds something to eat and, using almost no energy at all, simply carries on with its day.

    Or think about one of its predators.

    A bird sees something moving, predicts its trajectory, corrects its own flight, takes wind, obstacles and speed into account, and at the same time avoids crashing into a tree.

    All this seems perfectly normal to us.

    So normal, in fact, that we barely notice it anymore.

    The problem begins when we try to build one ourselves.

    So let's perform a little thought experiment.

    Imagine you are an excellent engineer, a graduate of the best university in the world.

    You have a fantastic laboratory, every instrument you could possibly want and, above all, an exceptionally generous sponsor.

    In short, you have money.

    A lot of money.

    Yes, I know exactly what you are thinking.

    Run away with the money.

    But no, unfortunately that is not allowed.

    Besides, it would make your life unnecessarily complicated and sooner or later someone would probably come looking for you.

    Your task is something else.

    You have to build something new.

    Not a car.

    Not a drone that flies for twenty minutes along a programmed route.

    You have to build an artificial being capable of living autonomously in our environment.

    It must move.

    It must understand, at least to some extent, what is happening around it.

    It must avoid danger.

    It must obtain the energy it needs.

    It must react when something changes.

    And, if possible, it must do all this without someone constantly holding its hand.

    In short:

    it has to live.

    I'll even give you one enormous advantage.

    I am not asking you to build it as small as a fly, because at that point our generous sponsor would probably start having serious second thoughts about the investment.

    Let's make it big.

    Let's say... an eagle.

    An artificial eagle.

    Large enough to contain batteries, motors, computers, cameras, sensors and everything else we might need.

    It should be easier.

    It should.

    Because our environment — the place we reassuringly call “nature” — is actually an incredibly complicated place.

    It changes all the time.

    It is hot, then cold.

    There is light, then darkness.

    An obstacle that did not exist yesterday is suddenly right in front of us today.

    The wind changes.

    A sensor gets dirty.

    A battery ages.

    A motor performs worse than expected.

    And above all, things happen that the designer never anticipated.

    At this point we could attack the problem in the most traditional way.

    We write rules.

    If this happens, do that.

    If an obstacle appears, turn right.

    Unless there is something else on the right.

    Then turn left.

    But if there is a strong wind on the left, slow down.

    Unless the battery is almost empty.

    In that case, look for a source of energy.

    But if, while searching...

    And this is where the trouble begins.

    Because after a while our program starts looking less like the brain of an eagle and more like the tax code of an unusually imaginative country.

    The real world has one particularly bad habit: it always finds the situation we forgot to anticipate.

    And it is precisely to deal with problems like these that, for many decades now, we have used a different approach.

    Artificial neural networks.

    The name may sound complicated, but the basic idea is not complicated at all.

    We have observed that in nature many problems are not solved by means of an enormous rule book written in advance.

    They are solved by systems made of huge numbers of very simple elements working together.

    We took inspiration from that idea and built an extremely simplified version of it.

    An artificial neural network is, in the end, a program.

    It receives information as input.

    For example:

    how much am I tilted?

    how fast am I moving?

    is there something in front of me?

    how much charge is left in the battery?

    And it produces answers.

    Speed up.

    Slow down.

    Turn.

    Stop.

    Between the inputs and the outputs there are what we call “artificial neurons”, arranged in layers and connected to one another.

    We do not necessarily have to explain every single rule of the world to the network.

    Instead, we can show it examples and gradually teach it how to behave.

    This process is normally called training.

    We can imagine it roughly like this:

    “When you find yourself in a situation like this, a good response looks something like this.”

    The network tries.

    It gets it wrong.

    It adjusts its connections a little.

    It tries again.

    And after a great many attempts it can become surprisingly good.

    Problem solved?

    Of course not.

    Because, as Leopardi reminded us, nature can be quite a harsh stepmother.

    The world changes.

    A network that worked perfectly yesterday may slowly begin to perform worse today.

    So we might imagine something more interesting.

    Suppose there is something continuously checking how well our network is doing.

    As long as everything works properly, it does nothing.

    But when it notices that performance is beginning to decline, it collects what has happened and tries to train the network again.

    Rather like saying:

    “Dear eagle, the world has changed. Let's see whether we can learn something new.”

    But that may not be enough.

    The problem may no longer be only what the network has learned.

    The network itself may no longer be suitable.

    Too simple.

    Too few neurons.

    Too few connections.

    A structure that was perfectly adequate yesterday but is no longer sufficient today.

    And this is where the central idea of this project begins.

    If retraining is not enough, why not allow the system to change its own structure as well?

    Add neurons.

    Create new layers.

    Try a different network.

    Evaluate it.

    And only if it really works better, use it instead of the previous one.

    Of course, we have to be careful.

    Because there is a very easy way to build a more powerful network:

    make it bigger and bigger.

    But that would be like solving every automotive problem by installing an ever larger engine.

    Sooner or later the engine may simply stop fitting under the bonnet.

    So our system has to learn something else too.

    A larger network is not automatically a better network.

    If achieving a tiny improvement means doubling the processor workload, doubling the memory and consuming much more energy, perhaps the game is not worth the candle.

    And so our artificial eagle has to ask itself a fairly sensible question:

    “Is this new head really better than the old one, or is it merely bigger?”

    But at this point an even more interesting question almost asks itself.

    If a network can grow when the world becomes difficult...

    can it also become smaller when it discovers that all that complexity is no longer necessary?

    Because in nature this happens all the time.

    An organism does not carry around useless things if it does not need them.

    Energy has a cost.

    Weight has a cost.

    Complexity has a cost.

    So we tried to add this possibility as well.

    After a long period of stability, the system may cautiously try to build a simpler version of itself.

    It removes something.

    It preserves, as far as possible, what it has already learned.

    It tests the result.

    It watches it.

    And if the smaller version continues to perform just as well, it promotes it.

    Otherwise it throws it away and calmly returns to the previous one.

    No drama.

    No leap into the void.

    At this point we have reached something rather curious.

    We no longer have only a neural network being trained.

    We have a small system that observes itself.

    It notices when it is no longer working well enough.

    It tries to learn again.

    If necessary, it tries to grow.

    When it can, it tries to simplify itself.

    It compares the result with what it had before.

    And it decides whether changing is really worthwhile.

    All this does not run in some enormous computing centre.

    It runs on a small embedded processor designed many years ago.

    And that is precisely what makes the experiment interesting.

    Because our goal was not to build the largest neural network possible.

    We wanted to see whether it was possible to build something that, despite having limited resources, could do something much closer to what we constantly observe in nature:

    adapt.

    We do not know whether our artificial eagle could ever truly learn to live.

    It would probably cost us a great deal of money before it even managed to take off.

    But we can begin by tackling one small part of the problem.

    We can try to build a system capable of changing when the world changes.

    And perhaps, every now and then, capable even of discovering that in order to do its job well it does not need to become bigger.

    It only needs to become better.
    Let's build the brain of our eagle
    Good.

    At this point we have an artificial eagle.

    Or rather, we have decided to build one.

    For the moment it is probably still scattered across the laboratory bench in the form of motors, batteries, wires, cameras and an unspecified number of screws which, as always happens, will somehow end up being at least three more than the available holes.

    But sooner or later we have to face the hardest problem.

    We have to give it a brain.

    And here it is worth making one thing clear immediately.

    We are not trying to build a human brain.

    We do not care whether our eagle can read Shakespeare, solve integrals or discuss its own existence.

    We need much less than that.

    We want it to be good at its job.

    Fly.

    Avoid obstacles.

    React to what happens.

    Come home.

    Preferably without flying straight into a closed window.

    It sounds modest.

    In reality, it is already a great deal.

    Let's start with the simple things

    Suppose our eagle has a number of sensors.

    One tells us whether it is tilted.

    Another measures how strongly it is accelerating.

    A camera tells us, in some form, what is happening in front of it.

    Another sensor tells us how much energy remains in the battery.

    We might have tens, hundreds or thousands of numbers describing the situation from moment to moment.

    These numbers are the eyes, ears and sense of balance of our machine.

    On the other side we have the things it can do.

    Turn.

    Climb.

    Descend.

    Accelerate.

    Slow down.

    So, viewed from a very great distance, the problem becomes almost trivial:

    data in, decisions out.

    In between we have to build something that learns how to transform the former into the latter.

    That something will be our neural network.

    A small brain, at least at the beginning

    This is where a very common temptation appears.

    If a network with a few neurons works well, then a network with many neurons must work better.

    And if many are better, then a huge number must be fantastic.

    That is the same philosophy you might use to design a toaster around the engine of a ship.

    It would probably work.

    There would simply be a few details left to sort out.

    For example, power consumption.

    Space.

    Cost.

    And the possibility that the kitchen might not survive the experiment.

    In our case we decided to begin from exactly the opposite idea.

    We start with a small network.

    The smallest one that has a reasonable chance of doing the job.

    If it is enough, we have won.

    If it is not enough, it will grow.

    This detail matters because the brain of our eagle does not run on an enormous laboratory computer.

    It runs on an embedded processor with finite resources.

    Truly finite resources.

    Memory is not infinite.

    The time available to make a decision is not infinite.

    Energy is not infinite.

    Every neuron we add costs something.

    And when an animal is flying, a few extra milliseconds can be more interesting than they might sound.


    But who decides whether the brain is still working properly?

    This is where the fun begins.

    Once trained, a neural network could simply be left to do its job.

    It receives data.

    It performs its calculations.

    It produces an answer.

    End of story.

    But we added someone watching it.

    A sort of small supervisor.

    It does not care how the network arrives at its answer.

    It cares about a much simpler question:

    is it still doing its job properly?

    If the answer is yes, nothing happens.

    And that matters.

    A well-designed autonomous system should possess one very important ability that is often underestimated:

    knowing when to leave things alone because everything is working.

    Constantly changing something simply because we can is an excellent way to create problems that did not exist before.

    So our supervisor watches.

    It waits.

    It accumulates experience.

    And as long as everything is going well, it leaves the eagle's brain alone.

    Then one day something changes

    Time passes.

    A motor ages.

    The weight changes.

    The wind is different.

    The camera no longer sees exactly as it did before.

    Or perhaps our artificial animal simply encounters situations that never appeared during training.

    Performance begins to decline.

    Hopefully not enough to make it immediately fall out of the sky.

    But enough to ring a warning bell.

    At this point the system does not immediately throw the network away.

    First it does the least invasive thing.

    It tries to teach it again.

    Over the last few minutes, hours or days it has collected new data.

    It has seen new situations.

    So it now has new material to learn from.

    The network is trained again.

    Then it is tested.

    If it starts performing well again, the problem is solved.

    Our eagle has learned something without having to change its brain.

    And what if learning is not enough?

    This brings us to the step that gave rise to much of this project.

    Suppose retraining is not enough.

    We can insist.

    Train again.

    And again.

    And again.

    But sooner or later it becomes reasonable to ask a different question:

    what if the problem is not what the network has learned, but what the network is capable of learning?

    Perhaps its brain has become too small for the new world in which it finds itself.

    It is like trying to write an encyclopaedia by continuing to add notes in the margins of a business card.

    Eventually you run out of room.

    And that is when our system tries to build a slightly larger network.

    Not a hundred networks.

    Not a thousand.

    Not every possible combination of neurons in the universe.

    One.

    The next one.

    According to very precise rules.

    It adds a few neurons.

    Or, if necessary, it adds a layer.

    And tries again.


    But we do not throw the old brain away

    This is one of the principles we cared about most.

    Imagine that, during flight, someone says to our eagle:

    “I have built you a new brain. From now on we are using that one. Fingers crossed.”

    I suspect the eagle might have something to say about that.

    We do the opposite.

    The old brain remains in command.

    Always.

    The new one is built alongside it.

    We call it, rather unimaginatively, the candidate.

    The candidate studies.

    It is trained.

    It is examined.

    And then it is allowed to observe reality without controlling anything.

    It receives the same data as the active brain and says what it would have done.

    But nobody gives it the keys to the eagle just yet.

    It is a sort of co-pilot on probation.

    It may speak.

    It may not touch the controls.

    “Are you really better?”

    At this point we might simply compare the answers of the two brains and choose the one that makes fewer mistakes.

    But there is a problem.

    Suppose the candidate is 0.1% better.

    Fantastic.

    Except that achieving that 0.1% requires twice the memory and twice as much time for every decision.

    Do we promote it?

    We decided that the answer should not automatically be yes.

    Because in the real world, being better has a cost.

    A larger brain needs more memory.

    More computation.

    More time.

    Often more energy.

    And our eagle does not fly plugged into a wall socket.

    So we do not ask only:

    “Is it better?”

    We ask:

    “Is it sufficiently better to justify what it costs?”

    No final magic score

    Here we made a somewhat unusual choice.

    We could have assigned a score to every network.

    For example:

    performance 8,

    speed 7,

    memory 6,

    energy 9.

    Then we could compute a nice average and declare a winner.

    Convenient.

    But dangerous too.

    Because when everything is compressed into a single number, important things can disappear.

    A very fast network that cannot perform its task correctly is not a good network.

    A wonderful network that does not fit into the processor's memory is not a good network.

    A slightly better network that takes three times longer to answer may not be a good network either.

    So we chose to keep the questions separate.

    Is it accurate enough?

    Does it fit in memory?

    Is it fast enough?

    Does it work in the numerical format we will actually use on the processor?

    Is the improvement meaningful?

    Is the extra cost reasonable?

    Every question must have its own answer.

    No magic score.

    The candidate enters probation

    If it passes all these checks, the new brain is still not declared the winner.

    It enters probation.

    For a while the system continues to watch it.

    If everything goes well, it becomes the new official brain.

    But the previous one is not immediately destroyed.

    It remains there.

    Ready.

    Because even the best tests cannot predict everything that may happen in the real world.

    If the new brain begins behaving badly during probation, the system goes back.

    No restart from zero.

    No panic.

    The old brain takes control again.

    It is a very simple principle:

    before throwing away something that worked, make very sure that its replacement truly works.

    It applies to neural networks.

    And probably to quite a few other things in life as well.

    So far we have taught the eagle to grow

    At this point the system can do something interesting.

    It starts with a small brain.

    It uses it.

    If necessary, it retrains it.

    If that is not enough, it tries a larger one.

    It compares it with the previous one.

    And it adopts it only if the advantage is real.

    We could stop here.

    But another problem would slowly appear.

    Every time the world becomes difficult, the brain can grow.

    And when the world becomes easy again?

    Nothing.

    It would remain large.

    Forever.

    It is the classic garage problem.

    At first you park the car in it.

    Then you add a shelf.

    Then a workbench.

    Then some boxes.

    A few years later the car sleeps outside and you cannot quite remember why you still own a modem from 1998.

    Complexity tends to accumulate.

    So we decided to teach our system how to tidy up as well.


    Every now and then, we try removing something

    If the eagle has been working well for a long time, is not facing difficult situations and there are no ongoing problems, the system may make an attempt.

    It builds a slightly smaller version of the current brain.

    It does not destroy the larger one.

    Of course not.

    That would be too easy.

    Instead it takes the existing brain and tries to determine which parts appear to contribute least to the result.

    Then it builds a smaller network while preserving, as far as possible, what has already been learned.

    It is not a perfect transplant.

    Removing neurons inevitably changes something.

    But it is better than starting from a completely empty brain.

    We can think of it as moving house.

    If we move from a five-room house to a four-room house, we do not throw everything away and buy all the furniture again.

    We try to take with us what we really need.

    And then the smaller network has to prove it deserves the job

    At this point something rather elegant happens.

    We do not need to invent new rules.

    The smaller network is treated exactly like any other candidate.

    It is trained.

    Tested.

    Compared.

    Observed.

    Only this time it begins with one major advantage:

    it costs less.

    So if it can maintain almost the same performance while using less memory, fewer calculations and less time, it immediately becomes very interesting.

    It is a candidate that can say:

    “I do practically the same thing, but I am smaller.”

    It is difficult to find a stronger argument than that.

    If it works, it is promoted.

    If it does not, it is discarded.

    The old brain simply carries on working.

    But it must not go on a diet every five minutes

    At this point someone might reasonably imagine a rather comical situation.

    The network grows.

    Then shrinks.

    Then grows.

    Then shrinks.

    A sort of permanent pre-summer diet.

    So we added something essential:

    patience.

    The system may try to become smaller only after a long period of stability.

    It is not enough for everything to work well for a few moments.

    It has to work well for long enough.

    And after a failed attempt, it must wait quite a while before trying again.

    And what if a real problem appears while simplification is in progress?

    The diet is immediately cancelled.

    Survival comes first.

    We can worry about the waistline later.

    Why wait that long?

    It is worth stopping here for a moment, because one of the first questions someone might ask is:

    “Who decided how long we have to wait?”

    The most honest answer is:

    we did.

    But not by rolling dice.

    We deliberately chose conservative values.

    If the world used in our test completes one full cycle every 12,000 observations, requiring 24,000 stable observations means waiting for at least two full cycles.

    The idea is simple.

    We do not want to mistake a short quiet spell for genuine stability.

    In the same way, the active brain must have reached a certain age before it can be put on a diet.

    And after one attempt, we wait again before repeating it.

    These are initial values.

    They are not laws of nature.

    One purpose of the long tests we are carrying out is precisely to discover whether those timings are reasonable.

    If we find that the system waits too long, we will shorten them.

    If we find that it changes its mind too often, we will increase them.

    That is how an engineering parameter should work:

    not because it “sounds right”, but because we can explain what problem it is intended to prevent and then experimentally verify whether it really does prevent it.


    Our brain has a memory too

    Not in the poetic sense.

    Perhaps that will come in another project.

    Here we mean something much more practical.

    The processor may be switched off.

    The battery may run out.

    Someone may unplug the power.

    An update may require a reboot.

    And when it comes back, we do not want to hear it say:

    “Good morning. Who am I?”

    So the system continuously saves the information required to reconstruct its state.

    Which brain is active.

    Which one came before it.

    Whether there is a new one currently being trained.

    How far training had progressed.

    Which structures have already been tried.

    Which ones failed.

    Whether it was trying to become smaller.

    How much longer it has to wait before trying again.

    And, above all, it saves everything cautiously.

    First it writes the new things.

    Then, only when it is sure they really exist, it updates the sign that says:

    “From this moment on, this is the official version.”

    It is an obvious precaution until the day power disappears at exactly the wrong moment.

    After that, it stops looking obvious very quickly.

    And what if the power fails right in the middle of a brain change?

    That was too entertaining a question not to test.

    So we simulated reboots during the various stages.

    During training.

    During a network change.

    After promotion.

    During probation.

    When the system comes back, it checks what was actually saved and reconstructs the roles.

    It does not blindly trust the last thought it had before power disappeared.

    It trusts what it finds actually written.

    In other words, it does not say:

    “I seem to remember promoting that network.”

    It checks.

    A quality which, come to think of it, might also be useful to human beings.


    Where does all this actually run?

    At this point we might imagine an impressive machine full of graphics cards.

    Fans.

    Kilowatts.

    A data-centre rack.

    But no.

    The main character in our experiment is an ADSP-BF518.

    An embedded processor designed quite a few years ago.

    It does not have infinite resources.

    Far from it.

    One of its more amusing characteristics is that it gives us only 4 kilobytes of stack.

    Four.

    Not four megabytes.

    Kilobytes.

    It is the sort of quantity that teaches humility very quickly.

    We cannot afford to create enormous temporary objects and assume that “the computer will deal with it somehow”.

    We have to decide where everything goes.

    Code that must run extremely fast is kept close to the processor.

    Control structures have another area.

    Larger data are placed in external memory.

    Even the tests, when they are not needed during normal operation, are moved away from the most precious memory.

    It is an annoying limitation.

    But it also makes the experiment much more interesting.

    Because it forces us to keep asking:

    do we really need this?



    And the brain talks

    During testing we realised that something was missing.

    If you leave a system running for hours, sooner or later you want to know what it is doing.

    But you do not want to interrupt it.

    You do not want to open files.

    You do not want to force it to save anything.

    You simply want to knock on the door and ask:

    “Hey, everything all right?”

    So we added the most sophisticated command in the entire project:

    ?

    By typing a question mark over the serial connection, the system replies with a few pieces of information.

    How long it has been working.

    Which brain is active.

    How many neurons it contains.

    Which generation we are on.

    Whether it is training something.

    Whether it is growing.

    Whether it is trying to shrink.

    How much free memory remains.

    Then it immediately goes back to work.

    It is probably the least technologically impressive part of the project.

    And it is one of my favourites.

    Because it turns a many-hour experiment into something you can simply greet every now and then.

    “How are things going?”



    And now we let it live

    At this point, the most interesting thing we can do is stop touching it.

    We have tested the individual mechanisms separately.

    We forced the system to grow.

    We forced it to shrink.

    We simulated better networks, worse networks, structural changes, reboots, rejections and returns to the previous version.

    We even checked that after all these operations the available memory returned exactly to its starting point.

    But those are tests.

    The real world begins when we leave the system alone for hours.

    Millions of observations.

    Changes.

    Quiet periods.

    Difficult periods.

    Successful attempts.

    Failed attempts.

    And at that point the question will no longer be:

    “Can the program grow?”

    We already know it can.

    Nor even:

    “Can it become smaller?”

    We have tested that too.

    The interesting question becomes:

    what will it choose to do when nobody orders it to do anything?

    Will it keep growing?

    Will it continually try to slim down?

    Will it oscillate?

    Or, after a while, will it find something like a natural size on its own?

    A region in which its brain is large enough to face its world, but no larger than necessary?

    As I write these words, the small processor on the bench is carrying out exactly this experiment.

    It works.

    It observes.

    It learns.

    Every now and then it changes its mind.

    For once, we are trying not to disturb it.

    In a few hours we will go and see what it has been up to.
    Free counters!
    VAT: IT -
    (C) 2016-2026 Officina Turini, Tutti i diritti riservati
    Back to content