dfpworm start
This commit is contained in:
parent
ac98cbe6c7
commit
30c6bf5f6f
7 changed files with 280 additions and 21 deletions
36
plugins/dfpworm/dfpwm-spec.md
Normal file
36
plugins/dfpworm/dfpwm-spec.md
Normal 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
|
||||
```
|
||||
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue