dfpworm start

This commit is contained in:
Haze Weathers 2025-09-16 14:47:30 -06:00
parent ac98cbe6c7
commit 30c6bf5f6f
7 changed files with 280 additions and 21 deletions

View file

@ -0,0 +1,36 @@
# Decoding
```
sample = 1.0 if predictor(bit) else -1.0`
```
# Encoding
```
if sample > last_predictor or (sample == last_predictor == 1.0):
bit = predictor(1)
else:
bit = predictor(0)
```
# Predictor
## State
charge: f32 = 0.0
strength: f32 = 1.0
last_bit: bool = false
## Parameters
- strength_increase: f32 = 7.0 / 127.0
- strength_decrease: f32 = 20.0 / 128.0
## Procedure
### Input comprehension
```
target: f32 = 1.0 if bit == true else -1.0
```
### Charge Adjustment
```
```