[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/b/ - Random
The stories and information posted here are artistic works of fiction and falsehood.
Only a fool would take anything posted here as fact.

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: poseidon_milli_16_16_Bw.jpg (1.11 MB, 2994x1730)
1.11 MB JPG
Rolled 3040915995 (1d4293918721)

thread for images of the two dimensional projection of an algebraic program compiled to a rank one constraint system. The program in question is (stdlib source omitted):

poseidon_milli_16_16(wtns! 1)
>>
>>
>>948865258
man, i really have to get started on my thesis program project...
>>
File: poseidon_milli_16_16_A_Aw.jpg (1.47 MB, 2290x1480)
1.47 MB JPG
>>948865915
what are you going to make?
>>
>>
>>
>>948865982
ai slop
>>
>>948866214
i've been toying with the idea of co-operative language design with an ai. Instead of making it use an existing language
>>
>>
>>
>>948866262
interesting. i'm trying to create a small, high quality simulation with the front of a social media app (inspired by insta) stuck on deciding how to get the pictures for the posts, dms and profile. don't wanna generate them, but making something that just looks them up and downloads them would give me too many stock images
>>
>>
>>948866455
ah that's a cool idea. The ai need a space that is physically real in which to exist. I want to allow agents to autonomously write programs then explore the 2d projection. Ideally they'd look for geometric patterns arguing security or insecurity of a construction, but i suspect they'll also find other things. The visualizations i'm showing are over the integers, so it's a physically real space, addressable, has congruences in higher dimensions, etc
>>
>>
>>
Just what in the god damn is goin on in here
>>
>>948866876
chillin looking at a program

# ~===~~=~=~~~===~=~~==~=~
# poseidon_milli_16_16
(input)

poseidon_milli(input, ...poseidon_milli_16_16_config())

# ~===~~=~=~~~===~=~~==~=~
# poseidon_milli_16_16_config
# poseidon permutation config for 16 inputs and 16 outputs
# targeting 256 bits of security.
()

static MDS_MATRIX = [0xcd1dda9f 0x3d86e3da 0x7fbf6486 0x175ae86a 0x45dde864 0x242baec9 0x8ea399f3 0xa6138652 0x7bf161ea 0x6c774c1a 0xabe1574d 0xd54b0380 0x2c764148 0x1a866b45 0x928e89d 0xe7fd624e 0x9fa39c23 0xf4ecf75e 0x389d41ef 0x2d678681 0xecb2e7af 0x87fe18e4 0x18dc518e 0x746f999 0x33e620e 0x131110b4 0x262afd62 0x8afdc6d 0xb0034d1d 0x77c910ec 0x26c76256 0x9a43f145 0x87b44068 ...
>>
>>
>>948866944
cool. I like.
>>
>>948866997
thank friend :)

# ~===~~=~=~~~===~=~~==~=~
# poseidon_milli_state
(mut state, INPUT_LEN, OUTPUT_LEN, ALPHA, N_ROUNDS_F, N_ROUNDS_P, MDS_MATRIX, ROUND_CONSTANTS)

assert_eq! OUTPUT_LEN + INPUT_LEN, len! state

static T = INPUT_LEN + OUTPUT_LEN
static N_ROUNDS_F_HALF = div_floor! N_ROUNDS_F, 2

# number of round constants
static TOTAL_ROUNDS = N_ROUNDS_F + N_ROUNDS_P
assert_eq! TOTAL_ROUNDS * T, len! ROUND_CONSTANTS

# MDS matrix is TxT
assert_eq! T * T, len! MDS_MATRIX

# split up the round constants for use
(static ROUND_CONSTANTS_FIRST, static ROUND_CONSTANTS_REM) = split_at! ROUND_CONSTANTS, T * N_ROUNDS_F_HALF
(static ROUND_CONSTANTS_SECOND, static ROUND_CONSTANTS_THIRD) = split_at! ROUND_CONSTANTS_REM, T * N_ROUNDS_P

# first set of full rounds
static _ = chunks_flat_map! ROUND_CONSTANTS_FIRST, T, c {
state = pow11(state + c)
state = mat_vec_mul((clone! MDS_MATRIX), state)
1
}

# partial rounds
static _ = chunks_flat_map! ROUND_CONSTANTS_SECOND, T, c {
state = state + c
state[0] = pow11(state[0])
state = mat_vec_mul((clone! MDS_MATRIX), state)
1
}

# final set of full rounds
static _ = chunks_flat_map! ROUND_CONSTANTS_THIRD, T, c {
state = pow11(state + c)
state = mat_vec_mul((clone! MDS_MATRIX), state)
1
}

state
>>
>>948865863
the real achievement is this image being under a Mb.
>>
>>948867078
# poseidon_milli_state
(mut state, INPUT_LEN, OUTPUT_LEN, ALPHA, N_ROUNDS_F, N_ROUNDS_P, MDS_MATRIX, ROUND_CONSTANTS)

assert_eq! OUTPUT_LEN + INPUT_LEN, len! state

static T = INPUT_LEN + OUTPUT_LEN
static N_ROUNDS_F_HALF = div_floor! N_ROUNDS_F, 2
static TOTAL_ROUNDS = N_ROUNDS_F + N_ROUNDS_P

assert_eq! TOTAL_ROUNDS * T, len! ROUND_CONSTANTS
assert_eq! T * T, len! MDS_MATRIX

# Split round constants once
(static RC_FULL1, static RC_PARTIAL_AND_FULL2) = split_at! ROUND_CONSTANTS, T * N_ROUNDS_F_HALF
(static RC_PARTIAL, static RC_FULL2) = split_at! RC_PARTIAL_AND_FULL2, T * N_ROUNDS_P

# Full rounds (first half)
static _ = chunks_flat_map! RC_FULL1, T, c {
state = pow11(state + c)
state = mat_vec_mul(MDS_MATRIX, state) # removed unnecessary clone!
1
}

# Partial rounds
static _ = chunks_flat_map! RC_PARTIAL, T, c {
state = state + c
state[0] = pow11(state[0])
state = mat_vec_mul(MDS_MATRIX, state)
1
}

# Full rounds (second half)
static _ = chunks_flat_map! RC_FULL2, T, c {
state = pow11(state + c)
state = mat_vec_mul(MDS_MATRIX, state)
1
}

state
>>
>>948867948
forgot to say try this.
>>
Skibidi



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.