├── README.md └── see.ts /README.md: -------------------------------------------------------------------------------- 1 | https://user-images.githubusercontent.com/69170106/230778324-9e4a03f8-1ca5-4675-b874-e37c7bc8382c.mp4 2 | -------------------------------------------------------------------------------- /see.ts: -------------------------------------------------------------------------------- 1 | import type { Call, Pipe, Booleans, Numbers, Objects, Strings, Tuples, Unions } from 'https://esm.sh/hotscript@1.0.11' 2 | 3 | 4 | 5 | /***** MAIN *****/ 6 | 7 | type Image = 8 | [ 9 | " ███ ", 10 | " █ ", 11 | " ██ ", 12 | " █ ", 13 | " ███ " 14 | ] 15 | 16 | type Result = See 17 | 18 | 19 | 20 | 21 | 22 | 23 | /***** NETWORK *****/ 24 | 25 | type ImageSerialized = Pipe< 26 | Image, 27 | [ 28 | Tuples.Join<''>, 29 | Strings.Split<''>, 30 | Tuples.Map>, 31 | Tuples.Map> 32 | ] 33 | > 34 | 35 | type Retina = { 36 | 1 : ImageSerialized[0] 37 | 2 : ImageSerialized[1] 38 | 3 : ImageSerialized[2] 39 | 4 : ImageSerialized[3] 40 | 5 : ImageSerialized[4] 41 | 6 : ImageSerialized[5] 42 | 7 : ImageSerialized[6] 43 | 8 : ImageSerialized[7] 44 | 9 : ImageSerialized[8] 45 | 10 : ImageSerialized[9] 46 | 11 : ImageSerialized[10] 47 | 12 : ImageSerialized[11] 48 | 13 : ImageSerialized[12] 49 | 14 : ImageSerialized[13] 50 | 15 : ImageSerialized[14] 51 | 16 : ImageSerialized[15] 52 | 17 : ImageSerialized[16] 53 | 18 : ImageSerialized[17] 54 | 19 : ImageSerialized[18] 55 | 20 : ImageSerialized[19] 56 | 21 : ImageSerialized[20] 57 | 22 : ImageSerialized[21] 58 | 23 : ImageSerialized[22] 59 | 24 : ImageSerialized[23] 60 | 25 : ImageSerialized[24] 61 | } 62 | 63 | type VisualArea1 = { 64 | 26 : AllAreActive3 65 | 27 : AllAreActive3 66 | 28 : AllAreActive3 67 | 29 : AllAreActive3 68 | 30 : AllAreActive3 69 | 31 : AllAreActive3 70 | 32 : AllAreActive3 71 | 33 : AllAreActive3 72 | 34 : AllAreActive3 73 | 35 : AllAreActive3 74 | 36 : AllAreActive3 75 | 37 : AllAreActive3 76 | 38 : AllAreActive3 77 | 39 : AllAreActive3 78 | 40 : AllAreActive3 79 | 80 | 41 : AllAreActive3 81 | 42 : AllAreActive3 82 | 43 : AllAreActive3 83 | 44 : AllAreActive3 84 | 45 : AllAreActive3 85 | 46 : AllAreActive3 86 | 47 : AllAreActive3 87 | 48 : AllAreActive3 88 | 49 : AllAreActive3 89 | 50 : AllAreActive3 90 | 51 : AllAreActive3 91 | 52 : AllAreActive3 92 | 53 : AllAreActive3 93 | 54 : AllAreActive3 94 | 55 : AllAreActive3 95 | 96 | 57 : AllAreActive3 97 | 60 : AllAreActive3 98 | 63 : AllAreActive3 99 | 65 : AllAreActive3 100 | 66 : AllAreActive3 101 | 67 : AllAreActive3 102 | 68 : AllAreActive3 103 | 69 : AllAreActive3 104 | 70 : AllAreActive3 105 | 71 : AllAreActive3 106 | 72 : AllAreActive3 107 | 73 : AllAreActive3 108 | 74 : AllAreActive3 109 | 75 : AllAreActive3 110 | 76 : AllAreActive3 111 | } 112 | 113 | type VisualArea2 = { 114 | 77 : AllAreActive2 115 | 78 : AllAreActive2 116 | 79 : AllAreActive2 117 | 80 : AllAreActive2 118 | 81 : AllAreActive2 119 | 82 : AllAreActive2 120 | 83 : AllAreActive2 121 | 84 : AllAreActive2 122 | 85 : AllAreActive2 123 | 86 : AllAreActive2 124 | 87 : AllAreActive2 125 | 88 : AllAreActive2 126 | 89 : AllAreActive2 127 | 90 : AllAreActive2 128 | 91 : AllAreActive2 129 | 92 : AllAreActive2 130 | 93 : AllAreActive2 131 | 94 : AllAreActive2 132 | 95 : AllAreActive2 133 | 96 : AllAreActive2 134 | 97 : AllAreActive2 135 | 98 : AllAreActive2 136 | 99 : AllAreActive2 137 | 100 : AllAreActive2 138 | 111 : AllAreActive2 139 | 112 : AllAreActive2 140 | 113 : AllAreActive2 141 | 114 : AllAreActive2 142 | 115 : AllAreActive2 143 | 116 : AllAreActive2 144 | 117 : AllAreActive2 145 | 118 : AllAreActive2 146 | 119 : AllAreActive2 147 | 120 : AllAreActive2 148 | 129 : AllAreActive2 149 | 130 : AllAreActive2 150 | 131 : AllAreActive2 151 | 132 : AllAreActive2 152 | 133 : AllAreActive2 153 | 134 : AllAreActive2 154 | 135 : AllAreActive2 155 | 136 : AllAreActive2 156 | 137 : AllAreActive2 157 | 138 : AllAreActive2 158 | 139 : AllAreActive2 159 | 140 : AllAreActive2 160 | 144 : AllAreActive2 161 | 145 : AllAreActive2 162 | 146 : AllAreActive2 163 | 147 : AllAreActive2 164 | 148 : AllAreActive2 165 | 149 : AllAreActive2 166 | 153 : AllAreActive2 167 | 154 : AllAreActive2 168 | 155 : AllAreActive2 169 | } 170 | 171 | type VisualArea4 = { 172 | 171 : AllAreActive3 173 | 172 : AllAreActive3 174 | 173 : AllAreActive3 175 | 174 : AllAreActive2 176 | 175 : AllAreActive2 177 | 176 : AllAreActive2 178 | 181 : AllAreActive3 179 | 182 : AllAreActive3 180 | 183 : AllAreActive3 181 | 184 : AllAreActive3 182 | 185 : AllAreActive3 183 | 186 : AllAreActive3 184 | 190 : AllAreActive2 185 | 191 : AllAreActive2 186 | 192 : AllAreActive2 187 | 196 : AllAreActive3 188 | 197 : AllAreActive3 189 | 198 : AllAreActive3 190 | 199 : AllAreActive2 191 | 200 : AllAreActive2 192 | 201 : AllAreActive2 193 | 203 : AllAreActive3 194 | 204 : AllAreActive3 195 | 205 : AllAreActive3 196 | 206 : AllAreActive3 197 | 207 : AllAreActive3 198 | 208 : AllAreActive3 199 | 216 : AllAreActive2 200 | 217 : AllAreActive2 201 | 218 : AllAreActive2 202 | 227 : AllAreActive2 203 | 228 : AllAreActive2 204 | 229 : AllAreActive2 205 | 233 : AllAreActive3 206 | 234 : AllAreActive3 207 | 235 : AllAreActive3 208 | 242 : AllAreActive3 209 | 243 : AllAreActive3 210 | 245 : AllAreActive3 211 | 246 : AllAreActive3 212 | 247 : AllAreActive3 213 | } 214 | 215 | type Complex = { 216 | 291 : AnyAreActive 217 | 292 : AnyAreActive 218 | 293 : AnyAreActive 219 | } 220 | 221 | type InferiorTemporalGyrus = { 222 | 0 : AnyAreActive 223 | 1 : AnyAreActive 224 | 2 : AnyAreActive 225 | 3 : AnyAreActive 226 | 4 : AnyAreActive 227 | 5 : AnyAreActive 228 | 6 : AnyAreActive 229 | 7 : AnyAreActive 230 | 8 : AnyAreActive 231 | 9 : AnyAreActive 232 | } 233 | 234 | type PossibleNumbers = Pipe< 235 | InferiorTemporalGyrus, 236 | [ 237 | Objects.PickBy>, 238 | Objects.Keys 239 | ] 240 | > 241 | 242 | type InhibitionOrder = [ 8, 9, 0, 2, 3, 7, 6, 4, 5, 1 ] 243 | 244 | type See = Call>, InhibitionOrder> 245 | 246 | 247 | /***** UTILITY FUNCTIONS *****/ 248 | 249 | type AllAreActive2< 250 | Network, 251 | X extends keyof Network, 252 | Y extends keyof Network 253 | > = Call, Network[Y]> 254 | 255 | type AllAreActive3< 256 | Network, 257 | X extends keyof Network, 258 | Y extends keyof Network, 259 | Z extends keyof Network 260 | > = Call>, [Network[X], Network[Y], Network[Z]]> 261 | 262 | type AnyAreActive< 263 | Network, 264 | Keys extends (keyof Network)[] 265 | > = Call< 266 | Tuples.Some>, 267 | KeysToValues 268 | > 269 | 270 | type KeysToValues = { 271 | [Index in keyof Keys]: Keys[Index] extends keyof T ? T[Keys[Index]] : never; 272 | } 273 | --------------------------------------------------------------------------------