Object Orientation

Il Tipo di Dato Astratto Introduzione Per questi tipi di dato non ci interessa di sapere cosa ci sia sotto (storato come bit? storato come sabbia boh), ci interessa solamente che abbia quei metodi, che possiamo in un certo senso identificare come la sua capsula, opaca in questo caso. Quando si può andare a modificare solamente attraverso questo metodo potrei dire che sia safe collegato alla Algebra dei tipi, nel senso che vengono soddisfatte sempre le proprietà del tipo. ...

August 28, 2024 · Reading Time: 7 minutes ·  By Xuanqiang Angelo Huang

Polimorfismo

Introduzione Monoforfo Quando non posso utilizzare un tipo come parametro. Ossia non possiamo definire una funzione generica. Polimorfismo Polimorfismo, come dice il nome, significa avere tante forme, in questo caso tanti tipi. Ma avere tanti tipi non è una cosa ambigua? Questa cosa si risolve solitamente a compile time (facendo checks di sottotipo, oppure dispatch della funzione corretta). A program part is polymorphic if it can be used for objects of several classes ...

August 28, 2024 · Reading Time: 13 minutes ·  By Xuanqiang Angelo Huang

Inheritance

Introduction to Inheritance Difference between Inheritance and Subtyping We say that a subclass is inheritance and subtyping. We have studied subtyping in Typing and Subtyping and it entails mainly two things: Liskov Substitution Polymorphism of the types While inheritance is just the code reuse and specialization. Another example of code reuse can be the “has-a” relation composition, which couples two objects together. With aggregations, we can also see delegation calls, when you have a class, and call a method of that class. ...

October 9, 2025 · Reading Time: 12 minutes ·  By Xuanqiang Angelo Huang

Typing and Subtyping

We first start with some design goals for the language Language Design Principles Simplicity Syntax and semantics can easily be understood by users and implementers of the language Expressiveness: Language can (easily) express complex processes and structures, conflicting with simplicity. Safety: Language discourages errors and allows errors to be discovered and reported, ideally at compile time Modularity: Language allows modules to be type-checked and compiled separately Performance: Programs written in the language can be executed efficiently Productivity: Language leads to low costs of writing programs like Python. Backwards Compatibility: Newer language versions work and interface with programs in older versions (dependency injection for examples helps for this.) ...

November 11, 2025 · Reading Time: 11 minutes ·  By Xuanqiang Angelo Huang

RL Function Approximation

These algorithms are good for scaling state spaces, but not actions spaces. The Gradient Idea Recall Temporal difference learning and Q-Learning, two model free policy evaluation techniques explored in Tabular Reinforcement Learning. A simple parametrization The idea here is to parametrize the value estimation function so that similar inputs gets similar values akin to Parametric Modeling estimation we have done in the other courses. In this manner, we don’t need to explicitly explore every single state in the state space. ...

January 17, 2025 · Reading Time: 14 minutes ·  By Xuanqiang Angelo Huang

Group Relative Policy Optimization

https://hlfshell.ai/posts/grpo/

Reading Time: 1 minute ·  By Xuanqiang Angelo Huang

Proximal Polixy Optimization

This document is DEPRECATED, please see RL Function Approximation. This documents attempts to briefly present the algorithm and some experiments found online about it. The following repo seems to be a good resource: here. Usually, PPO is explained as an actor critic framework. This means there is an agent that acts on the environment, and then there is a critic that collects the feedback from the environment. The main idea about this framework is to select a policy that is similar, so that it is less probable that a bad policy, a very different policy from the original is selected. This is achieved by clipping over the advantage. And then ...

Reading Time: 1 minute ·  By Xuanqiang Angelo Huang

Classical Cyphers

Introduzione a Crittografia al corso di crittografia di Christof Paar su Youtube, con aggiunte del corso Unibo. Classifications and definitions Classification nowadays as many many applications like, and it’s a increasing important field Cryptology (2) La branca comunemente riferita come crittografia è divisa principalmente in due campi crittografia e cryptanalysis in cui una cerca di creare nuovi metodi per cifrare i messaggi, e l’altro prova ad attaccare questi messaggi ritrovando il messaggio originale. ...

June 2, 2024 · Reading Time: 8 minutes ·  By Xuanqiang Angelo Huang

Architecture of the Brain

First, the brain is organized into functionally specific areas, and second, neurons in different parts of the vertebrate nervous system, indeed in all nervous systems, are quite similar. Small comparison with Computers A gross observation between computer’s transistors and human neurons is that there a big difference of numbers: trillions of transistors vs billions of neurons. 6 orders of magnitude frequency difference (Ghz versus 1kHz for neurons). Many many neural types and different types of connections. And the digital vs analog and chemical modes of communication. Parallel processor abilities. Fixed vs plastic architectures But this is comparing with transistors with one higher level object, so this comparison might not be completely fair. They are very different from this point of view. And only some brain areas are similar to real neural networks. ...

August 26, 2025 · Reading Time: 19 minutes ·  By Xuanqiang Angelo Huang

Systems for Artificial Intelligence

At the time of writing, the compute requirements for machine learning models and artificial intelligence are growing at a staggering rate of 200% every 3.5 months. Interest in the area is being quantified as 10k papers per month on the topic, while dollar investments on compute (energy, cooling, sustainability of compute in general) have had a hard time keeping up with the continuous new requests. Image from here ...

June 4, 2025 · Reading Time: 12 minutes ·  By Xuanqiang Angelo Huang