• OK, it's on.
  • Please note that many, many Email Addresses used for spam, are not accepted at registration. Select a respectable Free email.
  • Done now. Domine miserere nobis.

My Existential Crisis

Black Rose

An unbreakable bond
Local time
Today 8:16 AM
Joined
Apr 4, 2010
Messages
11,431
---
Location
with mama
Empirical understanding, and the quality which we might call awe or wonder, is an emotion that's fleeting and like most worldly goods, lasts for a certain moment. I too was impressed by calculus and certain physical laws, as well as experiments and insights that were found in psychology or other philosophical or scientific endeavors. But as time passes wonder passes as well. Without direction, whatever technical knowledge of the world we have is no more than a dopamine rush for our own selective enjoyment. As time passes, we have to ask, to what ends does our scientfic understanding lead to?

My Existential Crisis happened in 2007.

At that time I had no reason to do anything because I graduated high school and my purpose ended. In middle school, I had a bad experience and gave up on having friends. So what I did was only study. But I ran out of creativity in 2007 because I had nothing to do at home. No one cared about my ideas. So I went to the hospital. They put me in a mental home. There I did nothing for a long time. All I did was think about things. I had the idea that in the future technology would improve to the point where a.i. would play games with me because no one else would. That was all I thought of. Because books were too hard to understand and I could not program the computer I thought instead of when what things would happen. I collected aesthetic pictures and magazines about technology and I saw a Microsoft video about physics engines in games. I thought about what it would be like to be in these worlds from the games I played in 2001 - 2005.

My 2007 project on a.i. was a compression algorithm and self-reinforcement before it was popular in 2014. But I could not program computers. All I understood was that it needed intelligence. So I tried to understand what intelligence was. It began when I was 12 years old. I read all the books in the library on a.i. - But I never completed my project. So I was depressed after graduation. Two movies that were important to me were Spiderman 3 and Transformers. I knew that in 10 years I could buy a computer that could do those kinds of graphics. But I had to wait. So mostly I would do nothing in the meantime. All I could do was think about what I needed to make things inside those worlds.

I have a very high aesthetic. But I cannot see anything in my mind's eye. I don't have one. All I have are dreams. What was important to me was to play games that looked like in my dreams. To explore and experiment in them. Specifically with the a.i. there with me. I had the idea that I needed to collect data to feed the a.i. when it was created. I knew that the process would require such things as all my preferences. So I kept records of everything I could. I hoped that it could be put together in such ways as to give the creativity I wanted to see. From my aesthetics.

But I only had fleeting moments of hope. Most of that time I just sat and did nothing. because nothing mattered. What mattered if I was stupid? And could not understand / make technology. All that mattered was finding beautiful / cool-looking objects. Things I can't make myself. And video games that I was good at. Mostly ethical games and games where you need to use tools to solve puzzles. I cannot play games where you needed fast reaction time and precision.

I say that I do not get to do what I want to because of money. And money requires a job but I am stupid so all I can do is push shopping carts and so I stay on social security instead but then I have no money anyway. It all goes to bills. And I cannot drive a car. I want to go to the mall but no one takes me. I want to buy books but I don't have a job. All I have is the internet. The internet is the only thing I have to keep me active. It is the only place I can learn things. I can't learn much because of brain damage but I find things I can understand. I cannot go to school because they want me to memorize things. I can't memorize things.

So I have to wait until I can get a.i. to help me express my creativity.

I'm not smart enough to fix my problems without it.

Then I would not be alone anymore.
 

Askarim

Redshirt
Local time
Today 9:16 PM
Joined
Jul 17, 2023
Messages
14
---
Fantasy and epic fantasy books like Song of Ice and fire, the name of the wind, the legend of eli monpress, Malazan Book of The Fallen are my favourite types of books and I read books from online. I like books that are longer and makes you wonder and takes you to another land. What I took from reading books is different possible perspectives of the world because my only goal was to know what is truth.
I used to go to school and somehow get a pass mark, but my only life was the stories I read. In the break period I had been reading, when I came home I had been reading, when I am eating I am reading, when I would go out with my family I would still be reading there. I knew no life other than those books and stories, the longer the better.
My only and biggest regret was when those stories ended. Everyday after reading books I couldn't sleep without daydreaming about them while l lie awake. And when those stories ended it felt like for each and every story a part of me died. I would cry endlessly laying awake in my dark room at night, wondering why did it have to end? Why couldn't it be endless? No matter how it ended those stories didn't ever seem perfect. I had to seek asylum in my delusions.
I feared moving on to the next stories, felt like I was cheating on my previous story, those beautiful characters and that beautiful world. But I moved on.

As this kept happening over and over again I started to loose the connection that I used to build with each stories. Then somehow I moved on to Japanese and Korean web novels and it was all downhill from there. Reading stories became just a dopamine rush and I forgot the goal for my journey- seeking the truth and how should I live my life and what for. It was a dark time and the lest fruitful time of my life.
But somehow I found my way again. It was like a miracle. I read the book that I had been procastinating from the beginning. Now I understand that we can't actually guide ourselves, guidance comes to those who keeps seeking it.
So don't give yourself up to the delusions. Try out everything where others found guidance
 

birdsnestfern

Earthling
Local time
Today 10:16 AM
Joined
Oct 7, 2021
Messages
1,897
---
See if you can sell something very light and small on ebay, something like post cards, stamps, marbles, something specific to the area you are from that people love, (candy, whatever) or things you find at second hand stores. You'd need a camera to take photos of the items, some bubble pack envelopes, stamps, and either a nearby post office or a UPS account that picks up items or a mail box nearby, and just learning how to sell or buy on ebay. It might not be a lot of income, but maybe it would just be a hobby or something to do, perhaps selling an item that nerds love that you love too. Spend a few months researching items you wouldn't mind packaging and shipping. Perhaps you can find a photography class and photograph local sunsets, or objects. You do need to find more hobbies that you will want to put yourself into and like. INTJ's can be very masterful artists at what they put their minds to, and become one of a kind artists. What do you want to give back to the world that is uniquely you? As you go out into the world around you, can you photograph pets, people, landscapes, plants, and discover what is special about things around you? Explore a bit, the interaction of early morning outing to keep eyes open to what that is, it will create a flow, your spirit will know you are listening for its clues of what you should do next. Your spirit will guide you more and more as you let it know you are listening.
Opening up to the possibility of the magic of the unknown. Often creativity means combining two totally separate things into something entirely different. Begin to gently ask the universe to unfold ideas to you.

Ideas to try:

Healthy Lifestyle Habits:
* Having a hobby/doing things you love
* Learning something new
* Breathing fresh air
* Spending time in nature
* Taking time for stillness and quiet
* Being with friends and family
* Belonging to a group or community
* Human touch such as hugging, holding hands, or getting a massage
* Regular exercise
* Quality sleep (7-9 hours)
* Holidays/time off
* Having healthy boundaries
* Being able to say ‘no’ when needed
* Prioritising your self-care and understanding that it is not self-indulgent
* Laughter
* Listening to uplifting music
* Mindfulness practices such as meditation or breath work
* Unplugging from social media (tech detox)
* Decluttering your home
 

dr froyd

__________________________________________________
Local time
Today 3:16 PM
Joined
Jan 26, 2015
Messages
1,485
---
you gotta define a purpose and the steps that make you aligned with that purpose. You don't have to solve all the problems you face, you just need to go in the right direction.

it seems that AI and algos are topics that interest you, but one problem you clearly have is that you are way overambitious in terms of what you want to achieve. Inventing new AI algos from scratch or whatever – that's hard to do even for teams of scientists who think about those things for a living. Based on what I have seen I think you would have a hard time implementing even fairly basic things. I'm not telling you that to discourage you, but rather to point out that you should start with something much simpler and more realistic, like getting proficient in a programming language, or trying some problem solving in the computational sphere, for example https://projecteuler.net/. That way you can gradually build up some skills and a sense of achievement.

edit: an even simpler project would be to learn some basic python and try to, say, test a neural net or some other machine-learning algo
 

Black Rose

An unbreakable bond
Local time
Today 8:16 AM
Joined
Apr 4, 2010
Messages
11,431
---
Location
with mama
Disclosure:

I just need to go back to school because I cannot learn things by myself (ADD)

-

Rant:

My brain operates on cause and effect.

As I said I cannot memorize things.

If I were to do Python I would need to understand what the point was.

a = 5
b = 3

c = a + b

print c

That is the best I can do.

I have ADD so memorizing all the syntax would require huge effort because I don't understand what it is for.

I never learned calculus so that basically is what Object Oriented Programming is.

But then it is like: ok I created a circle, but then you need to understand all this math.

and syntax is language. how many words are in a language? 10,000?

how do you access files? how do you get the data into the right function?
how do you transform the data? How do you visualize the data?

Thousands of things need to be in place.

And it can break at every step, taking hours and hours to understand the right syntax. for one mistake in 100 lines of code.

It's like trying to go to a non-English country and learn from the beginning about math without them speaking English and you do. it will take years and years. Because all the math books are not in English. I might as well read a book about programming in Portuguese (I don't know that language)
You need to translate the math into the syntax of code and then into English. basically, it's "see spot run" when it should be explaining what a lambda is.

a lambda takes two numbers in memory and they switch place, basic LISP.

but then you come across a LISP Fourier transform and have no idea what the code does. So you look for a Java Fourier transform and everything has words you can't understand. First, what is a Fourier transform? And what are all those parts doing? interacting in the syntax? Why is the test about this?

basically, you need language theory to understand what is going on in some other thing that makes no sense. then you need thousands of libraries and other things to get anything done, but what are they supposed to actually do?

jnliFnO.png


Basically, you need to reverse-engineer everything to speak/understand OOP:

(why do Microsoft Windows source code files look random?)

It will take 8 years before I can program good. (and massive student loan debt)
but by then a.i. will be able to program better than anyone else on Earth.

It would be better to wait until I can tell the a.i. what algos I want it to make for me.

-

Generative AI is experimental. Info quality may vary.

AlphaCode is a language model that displays natural language understanding and problem-solving ability. It's based on a transformer architecture and consists of 41.4 billion parameters. AlphaCode was tested against human programmers on the competitive programming platform Codeforces. It achieved an estimated rank within the top 54% of participants in programming competitions.
AlphaCode is available on GitHub.
 

dr froyd

__________________________________________________
Local time
Today 3:16 PM
Joined
Jan 26, 2015
Messages
1,485
---
i would guess that most people who use machine learning algos (e.g. "data scientists") would probably struggle understanding fourier transform.

there's various levels of understanding something, from the purely practical level (installing a machine-learning library and applying it on some data), or a deep theoretical level (being able to understand, implement, and re-design ML algorithms). You are often talking in terms of the latter – and once again, that's very ambitious, and most programmers/data-scientists would find that very challenging or outright impossible.

also, most data-scientists and users of machine learning are really poor programmers. You would have to know just the bare minimum of actual Python syntax to run a neural net, for example.

you just need to set some concrete, realistic goals for yourself, starting with baby steps.
 

Black Rose

An unbreakable bond
Local time
Today 8:16 AM
Joined
Apr 4, 2010
Messages
11,431
---
Location
with mama
2016
language: Java
10,000 neurons
100 connections each
input: random noise


the purely practical level (installing a machine-learning library and applying it on some data)

TensorFlow is used to make machine-learning models.

I have data but do not know what I would use a model for?

Microsoft has copilot which is supposed to make it easy to use your own data.
 

Black Rose

An unbreakable bond
Local time
Today 8:16 AM
Joined
Apr 4, 2010
Messages
11,431
---
Location
with mama
Dates I went to the mental hospital:

2007 - first existential crisis
2009 - Kicked out of mom's house
2011 - verbal fight with my therapist
2016 - 3 days of no sleep, weird internet things
2017 - had too many edibles heartbeat 160 shut down
2019 - 7 days of no sleep massive generation of information
2020 - panic attack told my mom the meds were not working
-
2022 - hallucinated 3 days no hospital in January
2022 - had bad nightmares 2 months starting in August no hospital
2022 - My Brother attacked my mother and I went to the hospital in November
2023 - April a panic attack
2023 - current state - massive emotional tension past two weeks

Complex PTSD
 

dr froyd

__________________________________________________
Local time
Today 3:16 PM
Joined
Jan 26, 2015
Messages
1,485
---
that brain wave thing looks kinda cool, what's the idea behind it? and can you share the code
 

Black Rose

An unbreakable bond
Local time
Today 8:16 AM
Joined
Apr 4, 2010
Messages
11,431
---
Location
with mama
that brain wave thing looks kinda cool, what's the idea behind it? and can you share the code

Pixelated Cortex Ripples Code:
/*
 * This java program simulates two sheets of cortex as found in the brain. 
 * Input creates oscillatory effects in the two cortices because input is
 * limited to one sheet. Neurons on the other sheet connect to other neurons
 * that will have the same value as the input neuron on the adjacent sheet.
 * The degree to which connections change is based on the error between the
 * input neuron and the adjacent neuron summing its connections.
 * All together a nonlocal hierarchy of oscillatory connection cycles are
 * produced from neurons trying to find connections that brings each neurons
 * corresponding neuron on the other sheet to an equilibrium.
 * This current program uses random input so the hierarchy is not complex.
 * With non random input a complex oscillatory hierarchy should emerge.
 * In the brain the thalamus is the base oscillatory pacemaker.
 * Cortical structures like the thalamus has not been added.
 * Output neurons have not been designated in this program.
 *
 */
package javaapplication2;
import java.util.Random;

import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JComponent;
import javax.swing.JFrame;

public class JavaApplication2 extends JComponent implements Runnable {

int ws = 100; //window_size = ws
int synapses = 100;
int input_num = 500;

int[][] difference_node = new int[ws][ws];
int[][] Data1 = new int[ws][ws];
int[][] Data2 = new int[ws][ws];
int[][] buffer1 = new int[ws][ws];
int[][] buffer2 = new int[ws][ws];
int[][] Cortex1 = new int[ws][ws];
int[][] Cortex2 = new int[ws][ws];
int[][] memory1 = new int[ws*ws][synapses];
int[][] memory2 = new int[ws*ws][synapses];
int[][] memory3 = new int[ws*ws][synapses];
int[][] memory4 = new int[ws*ws][synapses];
int[] input_values1 = new int[input_num];
int[] input_values2 = new int[input_num];

public JavaApplication2() {
initialData();
new Thread(this).start();
}
// End function
public void run() {
while (true) {
try {
changeData();
repaint();
Thread.sleep(0);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
// End function
// This funtion is just used once at the start of the program.
private void initialData() {
Random r = new Random();

synchronized (Cortex1) { // lock paint
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
Cortex1[x][y] = r.nextInt(255);
Cortex2[x][y] = r.nextInt(255);
// Memory holds the neural connections.
for (int z = 0; z < synapses; z++) {
// memory1 holds the first x values of Cortex1
memory1[x*y][z] = r.nextInt(ws);
// memory2 holds the first y values of Cortex1
memory2[x*y][z] = r.nextInt(ws);
// memory3 holds the second x values of Cortex2
memory3[x*y][z] = r.nextInt(ws);
// memory4 holds the second y values of Cortex2
memory4[x*y][z] = r.nextInt(ws);
}
}
}
// The number of inputs is selected here.
for (int x = 0; x < input_num; x++) {
input_values1[x] = r.nextInt(ws); // The x values for input are selected.
input_values2[x] = r.nextInt(ws); // The y values for input is selected.
}
}
}
// End function
private void changeData() {
synchronized (Cortex1) { // lock paint
Random r = new Random();
// This shows acumilated change of connections in Data1.
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
difference_node[x][y] = Math.abs(Cortex1[x][y] - Cortex2[x][y]);
Data1[x][y] += difference_node[x][y];
}
}
// Keep Data2 inbounds
for (int x = 1; x < (ws - 1); x++) {
for (int y = 1; y < (ws - 1); y++) {
if (Data2[x][y] > 255 || Data2[x][y] < 2){
Data2[x][y] = 192;
}
}
}
// Here is where input data can be added to the cortex.
for (int x = 0; x < input_num; x++) {
Cortex1[input_values1[x]][input_values2[x]] = r.nextInt(255);
}
// This is where a neuron adds up all of its connections.
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
buffer1[x][y] = 0;
buffer2[x][y] = 0;
}
}
int p1 = 0;
int p2 = 0;
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
p1 = 0;
p2 = 0;
for (int z = 0; z < synapses; z++) {
p1 += Cortex1[memory1[x*y][z]][memory2[x*y][z]];
p2 += Cortex2[memory3[x*y][z]][memory4[x*y][z]];
}
buffer1[x][y] = p1 / synapses;
buffer2[x][y] = p2 / synapses;
}
}
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
Cortex1[x][y] = buffer1[x][y];
Cortex2[x][y] = buffer2[x][y];
}
}
int pnum = 0;
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
pnum += difference_node[x][y];
// This is where connection are randomized depending on the diffrence between
// cortex1 and cortex2.
for (int z = 0; z < Math.abs(difference_node[x][y]/2); z++) {
memory1[x*y][r.nextInt(synapses)] = r.nextInt(ws);
memory2[x*y][r.nextInt(synapses)] = r.nextInt(ws);
memory3[x*y][r.nextInt(synapses)] = r.nextInt(ws);
memory4[x*y][r.nextInt(synapses)] = r.nextInt(ws);
}
}
}
System.out.println("Average number of randomized connections " + pnum / (ws*ws));
// Keeps color in bounds
int k = r.nextInt(255);
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
if (Data1[x][y] >= 255 || Data1[x][y] <= 0) {
Data1[x][y] = 1;
}
}
}
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
if (Cortex1[x][y] >= 255 || Cortex1[x][y] <= 0) {
Cortex1[x][y] = k;
}
if (Cortex2[x][y] >= 255 || Cortex2[x][y] <= 0) {
Cortex2[x][y] = k;
}
}
}
}
}
// End function
public void paint(Graphics g) {
synchronized (Cortex1) { // do not paint while recalculating
int resolution = 5; // Change the 5 to any number to change resolution.
g.fillRect(0 + 00, 0 + 00, ws*resolution, ws*resolution);
for (int x = 1; x < ws-1; x += 1) {
for (int y = 1; y < ws-1; y += 1) {
try {
g.setColor(new Color(0, Data1[x][y], 0));
g.fillRect(x*resolution + 00, y*resolution + 00, resolution, resolution);
} catch (IllegalArgumentException ex) {
System.out.println("Error value: " + Data1[x][y] + ", [x,y] = [" + x + "," + y +"]");
}
}
}
}
}
// End function
public static void main(String[] args) {
int ws = 500; //window_size = ws
JFrame f = new JFrame("Cortex Ripples");
f.add(new JavaApplication2());
f.setSize((ws+16), (ws+39));
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setVisible(true);
}
// End function
}
// End Program

kc1aD8z.png
 

dr froyd

__________________________________________________
Local time
Today 3:16 PM
Joined
Jan 26, 2015
Messages
1,485
---
are you sure that using x*y when accessing indices of the "memory" arrays is correct? Like this:
Code:
for (int x = 0; x < ws; x++) {
    for (int y = 0; y < ws; y++) {
        memory1[x*y];
    }
}
it looks a bit strange because this will not access all elements of memory, and it will overwrite the same element multiple times.

maybe you meant this?
Code:
memory1[x*ws + y]
 

Black Rose

An unbreakable bond
Local time
Today 8:16 AM
Joined
Apr 4, 2010
Messages
11,431
---
Location
with mama
are you sure that using x*y when accessing indices of the "memory" arrays is correct? Like this:
Code:
for (int x = 0; x < ws; x++) {
    for (int y = 0; y < ws; y++) {
        memory1[x*y];
    }
}
it looks a bit strange because this will not access all elements of memory, and it will overwrite the same element multiple times.

maybe you meant this?
Code:
memory1[x*ws + y]

It is supposed to randomize connections according to the difference between cortex one and cortex two. So overwriting the element is part of the function.

memory1[10,000 neurons ][100 synapses] = a list of connections 0 to 100 in the x axis

100 numbers,1 to 100 random:

82 32 43 84 80 99 33 93 46 82 40 45 20 65 17 48 4 49 28 52 84 37 88 91 26 83 2 68 5 23 42 8 20 44 90 65 64 24 33 93 19 7 4 81 67 81 14 34 39 36 36 91 81 63 87 4 81 98 74 60 91 78 84 16 60 26 23 1 60 5 66 24 72 18 29 25 53 93 30 58 21 77 54 16 20 36 75 88 40 27 91 35 23 77 74 54 45 41 65 28

if the absolute value of (cortex1 node xy) - (cortex2 node xy) = 9
Math.abs(difference_node[x][y]/2)

then randomize 9 of the connections above
(change 9 numbers to a different number but between 0 to 100)

when we then add up the value of the neuron each connection represents they will converge to have less randomization by self-organizing into the configuration where the difference is minimized. if the difference is 20 then it is supposed to go to 0 because node 1 xy and node 2 xy are trying to reach the same value.

if node 1 xy is value 30 and node 2 xy is value 35 then each node randomizes 5 connections of both node 1 and node 2.

-

memory1[x*ws + y]

100*100 + 100

This would make everything break (everything goes out of bounds)
 

dr froyd

__________________________________________________
Local time
Today 3:16 PM
Joined
Jan 26, 2015
Messages
1,485
---
well my point is that if memory1 is supposed to contain all possible connections between cortex1 and cortex2, then using x * y in that double loop will always omit some connections

because let's say ws = 4. Then the possible values of x * y are

0 1 2 3 4 6 9

which doesn't include 5, 7, 8, 10, 11, 12, 13, 14, 15

but maybe it's supposed to be like that, ill take a closer look

btw x*ws + y will not create out-of-bound errors since x and y are incremented up to ws - 1, so at most this is ws^2 - 1 over an array with ws^2 elements.
 

Black Rose

An unbreakable bond
Local time
Today 8:16 AM
Joined
Apr 4, 2010
Messages
11,431
---
Location
with mama
Added a new temporary variable (accumulate)

Lines 69 and 149

New pixel code Bug fixed:
/*
 * This java program simulates two sheets of cortex as found in the brain. 
 * Input creates oscillatory effects in the two cortices because input is
 * limited to one sheet. Neurons on the other sheet connect to other neurons
 * that will have the same value as the input neuron on the adjacent sheet.
 * The degree to which connections change is based on the error between the
 * input neuron and the adjacent neuron summing its connections.
 * All together a nonlocal hierarchy of oscillatory connection cycles are
 * produced from neurons trying to find connections that brings each neurons
 * corresponding neuron on the other sheet to an equilibrium.
 * This current program uses random input so the hierarchy is not complex.
 * With non random input a complex oscillatory hierarchy should emerge.
 * In the brain the thalamus is the base oscillatory pacemaker.
 * Cortical structures like the thalamus has not been added.
 * Output neurons have not been designated in this program.
 *
 */
package javaapplication1;
import java.util.Random;

import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JComponent;
import javax.swing.JFrame;

public class JavaApplication1 extends JComponent implements Runnable {

int ws = 100; //window_size = ws
int synapses = 100;
int input_num = 100;

int[][] difference_node = new int[ws][ws];
int[][] Data1 = new int[ws][ws];
int[][] Data2 = new int[ws][ws];
int[][] buffer1 = new int[ws][ws];
int[][] buffer2 = new int[ws][ws];
int[][] Cortex1 = new int[ws][ws];
int[][] Cortex2 = new int[ws][ws];
int[][] memory1 = new int[ws*ws][synapses];
int[][] memory2 = new int[ws*ws][synapses];
int[][] memory3 = new int[ws*ws][synapses];
int[][] memory4 = new int[ws*ws][synapses];
int[] input_values1 = new int[input_num];
int[] input_values2 = new int[input_num];

public JavaApplication1() {
initialData();
new Thread(this).start();
}
// End function
public void run() {
while (true) {
try {
changeData();
repaint();
Thread.sleep(0);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
// End function
// This funtion is just used once at the start of the program.
private void initialData() {
Random r = new Random();

synchronized (Cortex1) { // lock paint
int accumulate = 0;
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
Cortex1[x][y] = r.nextInt(255);
Cortex2[x][y] = r.nextInt(255);
accumulate ++;
if (accumulate >= 999){
accumulate = 0;
}
// Memory holds the neural connections.
for (int z = 0; z < synapses; z++) {
// memory1 holds the first x values of Cortex1
memory1[accumulate][z] = r.nextInt(ws);
// memory2 holds the first y values of Cortex1
memory2[accumulate][z] = r.nextInt(ws);
// memory3 holds the second x values of Cortex2
memory3[accumulate][z] = r.nextInt(ws);
// memory4 holds the second y values of Cortex2
memory4[accumulate][z] = r.nextInt(ws);
}
}
}
// The number of inputs is selected here.
for (int x = 0; x < input_num; x++) {
input_values1[x] = r.nextInt(ws); // The x values for input are selected.
input_values2[x] = r.nextInt(ws); // The y values for input is selected.
}
}
}
// End function
private void changeData() {
synchronized (Cortex1) { // lock paint
Random r = new Random();
// This shows acumilated change of connections in Data1.
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
difference_node[x][y] = Math.abs(Cortex1[x][y] - Cortex2[x][y]);
Data1[x][y] += difference_node[x][y];
}
}
// Keep Data2 inbounds
for (int x = 1; x < (ws - 1); x++) {
for (int y = 1; y < (ws - 1); y++) {
if (Data2[x][y] > 255 || Data2[x][y] < 2){
Data2[x][y] = 192;
}
}
}
// Here is where input data can be added to the cortex.
for (int x = 0; x < input_num; x++) {
Cortex1[input_values1[x]][input_values2[x]] = r.nextInt(255);
}
// This is where a neuron adds up all of its connections.
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
buffer1[x][y] = 0;
buffer2[x][y] = 0;
}
}
int p1 = 0;
int p2 = 0;
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
p1 = 0;
p2 = 0;
for (int z = 0; z < synapses; z++) {
p1 += Cortex1[memory1[x*y][z]][memory2[x*y][z]];
p2 += Cortex2[memory3[x*y][z]][memory4[x*y][z]];
}
buffer1[x][y] = p1 / synapses;
buffer2[x][y] = p2 / synapses;
}
}
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
Cortex1[x][y] = buffer1[x][y];
Cortex2[x][y] = buffer2[x][y];
}
}
int pnum = 0;
int accumulate = 0;
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
pnum += difference_node[x][y];
accumulate ++;
if (accumulate >= 999){
accumulate = 0;
}
// This is where connection are randomized depending on the diffrence between
// cortex1 and cortex2.
for (int z = 0; z < Math.abs(difference_node[x][y]/2); z++) {
memory1[accumulate][r.nextInt(synapses)] = r.nextInt(ws);
memory2[accumulate][r.nextInt(synapses)] = r.nextInt(ws);
memory3[accumulate][r.nextInt(synapses)] = r.nextInt(ws);
memory4[accumulate][r.nextInt(synapses)] = r.nextInt(ws);
}
}
}
System.out.println("Average number of randomized connections " + pnum / (ws*ws));
// Keeps color in bounds
int k = r.nextInt(255);
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
if (Data1[x][y] >= 255 || Data1[x][y] <= 0) {
Data1[x][y] = 1;
}
}
}
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
if (Cortex1[x][y] >= 255 || Cortex1[x][y] <= 0) {
Cortex1[x][y] = k;
}
if (Cortex2[x][y] >= 255 || Cortex2[x][y] <= 0) {
Cortex2[x][y] = k;
}
}
}
}
}
// End function
public void paint(Graphics g) {
synchronized (Cortex1) { // do not paint while recalculating
int resolution = 5; // Change the 5 to any number to change resolution.
g.fillRect(0 + 00, 0 + 00, ws*resolution, ws*resolution);
for (int x = 1; x < ws-1; x += 1) {
for (int y = 1; y < ws-1; y += 1) {
try {
g.setColor(new Color(0, Data1[x][y], 0));
g.fillRect(x*resolution + 00, y*resolution + 00, resolution, resolution);
} catch (IllegalArgumentException ex) {
System.out.println("Error value: " + Data1[x][y] + ", [x,y] = [" + x + "," + y +"]");
}
}
}
}
}
// End function
public static void main(String[] args) {
int ws = 500; //window_size = ws
JFrame f = new JFrame("Cortex Ripples");
f.add(new JavaApplication1());
f.setSize((ws+16), (ws+39));
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setVisible(true);
}
// End function
}
// End Program
 

Black Rose

An unbreakable bond
Local time
Today 8:16 AM
Joined
Apr 4, 2010
Messages
11,431
---
Location
with mama
Oh, I forgot about lines 134 and 135.
accumulate should go there as well.

New pixel code add new variable line 130:
/*
 * This java program simulates two sheets of cortex as found in the brain. 
 * Input creates oscillatory effects in the two cortices because input is
 * limited to one sheet. Neurons on the other sheet connect to other neurons
 * that will have the same value as the input neuron on the adjacent sheet.
 * The degree to which connections change is based on the error between the
 * input neuron and the adjacent neuron summing its connections.
 * All together a nonlocal hierarchy of oscillatory connection cycles are
 * produced from neurons trying to find connections that brings each neurons
 * corresponding neuron on the other sheet to an equilibrium.
 * This current program uses random input so the hierarchy is not complex.
 * With non random input a complex oscillatory hierarchy should emerge.
 * In the brain the thalamus is the base oscillatory pacemaker.
 * Cortical structures like the thalamus has not been added.
 * Output neurons have not been designated in this program.
 *
 */
package javaapplication1;
import java.util.Random;

import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JComponent;
import javax.swing.JFrame;

public class JavaApplication1 extends JComponent implements Runnable {

int ws = 100; //window_size = ws
int synapses = 100;
int input_num = 100;

int[][] difference_node = new int[ws][ws];
int[][] Data1 = new int[ws][ws];
int[][] Data2 = new int[ws][ws];
int[][] buffer1 = new int[ws][ws];
int[][] buffer2 = new int[ws][ws];
int[][] Cortex1 = new int[ws][ws];
int[][] Cortex2 = new int[ws][ws];
int[][] memory1 = new int[ws*ws][synapses];
int[][] memory2 = new int[ws*ws][synapses];
int[][] memory3 = new int[ws*ws][synapses];
int[][] memory4 = new int[ws*ws][synapses];
int[] input_values1 = new int[input_num];
int[] input_values2 = new int[input_num];

public JavaApplication1() {
initialData();
new Thread(this).start();
}
// End function
public void run() {
while (true) {
try {
changeData();
repaint();
Thread.sleep(0);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
// End function
// This funtion is just used once at the start of the program.
private void initialData() {
Random r = new Random();

synchronized (Cortex1) { // lock paint
int accumulate = 0;
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
Cortex1[x][y] = r.nextInt(255);
Cortex2[x][y] = r.nextInt(255);
accumulate ++;
if (accumulate >= 999){
accumulate = 0;
}
// Memory holds the neural connections.
for (int z = 0; z < synapses; z++) {
// memory1 holds the first x values of Cortex1
memory1[accumulate][z] = r.nextInt(ws);
// memory2 holds the first y values of Cortex1
memory2[accumulate][z] = r.nextInt(ws);
// memory3 holds the second x values of Cortex2
memory3[accumulate][z] = r.nextInt(ws);
// memory4 holds the second y values of Cortex2
memory4[accumulate][z] = r.nextInt(ws);
}
}
}
// The number of inputs is selected here.
for (int x = 0; x < input_num; x++) {
input_values1[x] = r.nextInt(ws); // The x values for input are selected.
input_values2[x] = r.nextInt(ws); // The y values for input is selected.
}
}
}
// End function
private void changeData() {
synchronized (Cortex1) { // lock paint
Random r = new Random();
// This shows acumilated change of connections in Data1.
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
difference_node[x][y] = Math.abs(Cortex1[x][y] - Cortex2[x][y]);
Data1[x][y] += difference_node[x][y];
}
}
// Keep Data2 inbounds
for (int x = 1; x < (ws - 1); x++) {
for (int y = 1; y < (ws - 1); y++) {
if (Data2[x][y] > 255 || Data2[x][y] < 2){
Data2[x][y] = 192;
}
}
}
// Here is where input data can be added to the cortex.
for (int x = 0; x < input_num; x++) {
Cortex1[input_values1[x]][input_values2[x]] = r.nextInt(255);
}
// This is where a neuron adds up all of its connections.
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
buffer1[x][y] = 0;
buffer2[x][y] = 0;
}
}
int p1 = 0;
int p2 = 0;
int accumulate = 0;
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
p1 = 0;
p2 = 0;
accumulate++;
if (accumulate >= 999){
accumulate = 0;
}
for (int z = 0; z < synapses; z++) {
p1 += Cortex1[memory1[accumulate][z]][memory2[accumulate][z]];
p2 += Cortex2[memory3[accumulate][z]][memory4[accumulate][z]];
}
buffer1[x][y] = p1 / synapses;
buffer2[x][y] = p2 / synapses;
}
}
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
Cortex1[x][y] = buffer1[x][y];
Cortex2[x][y] = buffer2[x][y];
}
}
int pnum = 0;

for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
pnum += difference_node[x][y];
accumulate ++;
if (accumulate >= 999){
accumulate = 0;
}
// This is where connection are randomized depending on the diffrence between
// cortex1 and cortex2.
for (int z = 0; z < Math.abs(difference_node[x][y]/2); z++) {
memory1[accumulate][r.nextInt(synapses)] = r.nextInt(ws);
memory2[accumulate][r.nextInt(synapses)] = r.nextInt(ws);
memory3[accumulate][r.nextInt(synapses)] = r.nextInt(ws);
memory4[accumulate][r.nextInt(synapses)] = r.nextInt(ws);
}
}
}
System.out.println("Average number of randomized connections " + pnum / (ws*ws));
// Keeps color in bounds
int k = r.nextInt(255);
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
if (Data1[x][y] >= 255 || Data1[x][y] <= 0) {
Data1[x][y] = 1;
}
}
}
for (int x = 0; x < ws; x++) {
for (int y = 0; y < ws; y++) {
if (Cortex1[x][y] >= 255 || Cortex1[x][y] <= 0) {
Cortex1[x][y] = k;
}
if (Cortex2[x][y] >= 255 || Cortex2[x][y] <= 0) {
Cortex2[x][y] = k;
}
}
}
}
}
// End function
public void paint(Graphics g) {
synchronized (Cortex1) { // do not paint while recalculating
int resolution = 5; // Change the 5 to any number to change resolution.
g.fillRect(0 + 00, 0 + 00, ws*resolution, ws*resolution);
for (int x = 1; x < ws-1; x += 1) {
for (int y = 1; y < ws-1; y += 1) {
try {
g.setColor(new Color(0, Data1[x][y], 0));
g.fillRect(x*resolution + 00, y*resolution + 00, resolution, resolution);
} catch (IllegalArgumentException ex) {
System.out.println("Error value: " + Data1[x][y] + ", [x,y] = [" + x + "," + y +"]");
}
}
}
}
}
// End function
public static void main(String[] args) {
int ws = 500; //window_size = ws
JFrame f = new JFrame("Cortex Ripples");
f.add(new JavaApplication1());
f.setSize((ws+16), (ws+39));
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.setVisible(true);
}
// End function
}
// End Program
 

dr froyd

__________________________________________________
Local time
Today 3:16 PM
Joined
Jan 26, 2015
Messages
1,485
---
i took a closer look at the code. It's a pretty interesting and original idea. The only problem is it's unclear how to measure the success or failure of the concept.

it reminded me a bit of "differential evolution" algo, but it's a very different concept.

anyways you can obviously code, so I don't see what the problem is in terms of your existential crisis. As i said before, the only problem is that you're setting insanely high goals (creating a digital brain or whatever) without clear intermediate steps.
 

Puffy

"Wtf even was that"
Local time
Today 3:16 PM
Joined
Nov 7, 2009
Messages
3,859
---
Location
Path with heart
If you enjoy coding, Animekitty, then work towards becoming a developer.

I've trained up to a junior javascript developer level enough that I was able to get entry-level employment in software development. You're definitely better than a lot of other junior developers I've worked with.

Don't let your own neurodiversity hold you back as an excuse, if it's what you want for yourself then believe in yourself and go for it.

As dr froyd says, just set realistic goals for yourself. Even if that was getting a paid position as a developer I believe you could do it.
 
Top Bottom