Saturday, 10 June 2017

What determines which universe you're going to experience?

1) Munchhausen's trilemma: Nothing can be proven unconditionally (as far as we know).

2) There is at least one consciousness that experiences things change at a finite rate (mine). It's probable that others exist as well.

3) Quantum mechanics is incomplete, because experimental results are best predicted by probabilistic models and probability is related to incomplete information.

4) General relativity implies that space and time are not independent of each other, fundamental or independent of mass-energy or in general information and events related to them.

5) Entropy grows with time.

6) Science cannot explain why the cosmos exists, only how the observable universe evolves. It tells us what future bets are justified based on the past. This is likely the best anyone can ever hope to do.

7) Purpose of postulates is to add to the predictive power of our existing models of reality. Supernatural is not a useful postulate as it does not make predictions that could be tested. Supernatural is not nonsense because it's probably false, it's nonsense because the postulate cannot be justified.

8) Fine-tuning of the observable universe either doesn't exist or the cosmos is infinitely complex and we must by necessity find ourselves somewhere within such set.

9) The observable universe probably hasn't always existed. The cosmos probably has, to the extent that it even has time. The origin of the observable universe is likely atemporal and thus talk of a cause is likely nonsense.

Thursday, 25 May 2017

How to win 1 M€ with 99% probability?

Play no limit roulette and bet 1 M€ on either black or red and always double your bet until you've made 1 M€ profit (then stop and never look back).

The joke is that you need to be able to go 127 M€ into debt to have 99% probability of winning 1 M€ as you need to be prepared to double in case you lose to win back your money and reach your goal. Your expectation value is always negative as you are likely to lose quite a lot when you do, but if you happen to have access to 127 M€, your chances of winning 1 M€ are approx. 99%.

A rational agent should never bet on negative expectation value, but given 99% rate of success, how many of us wouldn't? Besides of course banks and such to whom 127 M€ is nothing and only cumulative long term profits matter.


European roulette has slightly better odds than American since European has only one 0 instead of two (0 and 00). I wonder what's the limit in Monte Carlo?

If you have only 7 M€ limit (and start with 1 M€ bet), your chances of winning 1 M€ are still around 86%. If you have 100 k€ debt limit and start with 100 k€ bet, your chances of winning 1 M€ are 5.6%.

Beware the Barrenness of a Busy Life

clear all
MAXDEBT = 127;
for x = 1:1e6                       % test the strategy
    money = 0;                      % start with no money
    bet = 1;                        % starting bet
    while money < 1                 % play until you made 1 unit
        money = money - bet;        % bet
        if rand < 18/37             % roulette (18 red, 18 black and 0)
            money = money + 2*bet;  % if you win, you win double your bet
        end                         % otherwise lost the bet
        bet = 2*bet;                % double the bet after each round
        if money-bet<-MAXDEBT       % stop if at the limit
          break;
        end
    end
    mon(x) = money;
end

Ex = mean(mon)                      % ~ -0.2
MIN = min(mon)                      % -127
Pwin = sum(mon>0)/x                 % ~ 0.99

Wednesday, 3 May 2017

The simplest acts of kindness are by far more powerful than a thousand heads bowing in prayer.

Our understanding of the arbitrary biological origin of morality does not determine our willingness to act morally. Subscribing to moral nihilism does not pose any problem. We've evolved to become moral creatures, and that's just the way we are even if such is ultimately arbitrary. There's nothing wrong in killing on some cosmic scale. Right and wrong are not properties of the universe, they are properties of living feeling creatures. Things that are wrong to us, are so because that's the way our species is (for the most part). This is due to our common history and to the extent that we don't share some values then that is just an argument against objective morality. This does not mean we should stop feeling, teaching of morality or punishing the guilty (or at least managing crime and human behavior). It just means morality is a functional state of our species (and to an extent our ecosystem).


It is not inconceivable that a species might exist that would accept murder (or something like that) as part of their daily lives (though it would likely need to exist under circumstances that would not be harmful or would even be beneficial for the survival of that species). Who are we to say it's wrong if every single individual of that species thinks it's right and it serves their survival.

We are not such a species and to kill another human is almost universally considered unacceptable and harmful by humans (for practical good reasons in my opinion). It is also a matter of how such things make us feel. Even if feelings are arbitrary, they are a property we possess and they are closely related to our conscious experience. They are also what makes us individuals and in my opinion we should proudly embrace our individuality, because what else is life and consciousness besides embracing ones own complexities and experience (which to some degree includes that which we call the external world)?


I almost always value the autonomy of any creature over their own lives above anything else. Some people possess values that may conflict mine. When it comes down to the basics, there is not much more to it. A particular value in vacuum is not irrational as such, but often poor reasons are given. Rationalization in general is not difficult and people love to do it, but what is less often discussed is that reasons aren't necessarily needed. Having them and thinking that's all there is might in fact make things worse. People try to rationalize arbitrary emotional values when in fact doing so and being ignorant of the arbitrary emotional basis is a sign of irrationality. Rationalization matters only to the extent that conflicting values are held. Sometimes, however, two people might have conflicting values without holding any conflicting values of their own. One might think this would be the only reason for war. To defend ones way of life against someone whose highest priority is to eliminate your way of life and replace it with something you can never accept. However, from what I know that has never been the primary reason for war. Go figure.


Values become interesting (or even problematic) only after you find the continued existence of your way of life is contributing harm to others or in general you find that your way of life is in conflict with your values. You are forced to weigh the value of your particular experience relative to how much you value that of others. You can try to do balancing, give up something that you don't value that much, but eventually you might reach funny conclusions such as that your particular experience or even existence isn't justified even on the scale of your own species, let alone on some cosmic scale. Then again, you are too small to know this to be true, but as you have nothing but your own faculties of reasoning to arrive at a conclusion, you are forced to arrive at one anyway. Unfortunately after you follow all the lines of reasoning you might still find it's all irrelevant and arbitrary. Sometimes all that matters is that which feels right. Thank goodness we appear to have something resembling the idea of conscience and intrinsic will to live, at least some if not most of us.

Monday, 1 May 2017

What if existence of suffering is necessary for consciousness to exist?

Fractals on Arduino Nano with fixed-point arithmetic today...

These small 128x64 monochrome OLED displays were 3.2 euros from ebay.

Serial output from the board as seen by minicom in linux.
Scientific knowledge is that which is useful for making predictions, everything else is just something else.
This 16 MHz board costs 2.2 euros in ebay.
/* avr-gcc -Os mandelbrot.c -mmcu=atmega328p -o program.elf
 * avr-objcopy -O ihex -R .eeprom program.elf program.hex
 * avrdude -c arduino -b 57600 -P /dev/ttyUSB0 -p atmega328p -vv -U flash:w:program.hex
 * (apt-get install avrdude gcc-avr avr-libc)
 */

#define F_CPU 16000000UL
#define BAUD 115200

#include <avr/io.h>
#include <stdio.h>
#include <util/delay.h>
#include <util/setbaud.h>

putch(char a) {
  loop_until_bit_is_set(UCSR0A, UDRE0);
  UDR0 = a;
}

int main() {
  int x, y, n, F = 1e3;
  long x0, x1, x2, y0, y1, y2;

  UCSR0A |= _BV(U2X0);
  while(1) {
    for(y=0; y<23; y++) {
      for(x=0; x<80; x++) { 
        x0 = F*6*x/80 - 7*F/2;
  y0 = F*6*y/23 - 3*F;
  x1 = 0;
  y1 = 0;
  n = 0;
  while(sqrt(x1*x1+y1*y1) < F*8 && ++n < 64) {
          x2 = x1*x1/F - y1*y1/F;
          y2 = 2*x1*y1/F;
          x1 = x2 + x0;
          y1 = y2 + y0;
  }
        putch(32+n);
      }
      putch('\r');
      putch('\n');
    }
    putch(27);
    putch('[');
    putch('H');
  }
}


With the OLED display...


int mandelbrot(long xx, long yy) {
  long x0, y0, x1, y1, x2, y2;
  int n, F = 1000;
  
  x0 = F*3*xx/128 - 7*F/2;
  y0 = F*3*yy/64 - 3*F/2;
  x1 = 0;
  y1 = 0;
  n = 0;
  while(sqrt(x1*x1+y1*y1) < F*8 && ++n < 11) {
    x2 = x1*x1/F - y1*y1/F;
    y2 = 2*x1*y1/F;
    x1 = x2 + x0;
    y1 = y2 + y0;
  }
  return n;
}

void loop() {
  unsigned char x, y, z, c;
  int xx, yy;

  for(y=0; y<8; y++) {
    LED_WrCmd(0xb0+y);
    LED_WrCmd(0x00);
    LED_WrCmd(0x10);
    xx = 0;
    for(xx=0; xx<256; xx++) {
      z = 1;
      c = 0;
      for(x=0; x<8; x++) {
        yy = x+y*8;
        if(mandelbrot(xx, yy)>10)
          c = c + z;
        z = 2*z;

      }
      LED_WrDat(c);
      xx++;
    }
  }

}

Sunday, 16 April 2017

I realized that there's a big difference between deciding to leave and knowing where to go.

So apparently I was bored so I wrote a program in C that numerically simulates time evolution of the Schrödinger equation and a wave packet tunneling through a potential barrier. Nothing unusual, but to make it a bit harder, I decided that I will also write my own basic functions such as exponential function, square root and sine using nothing but standard additions, subtractions and multiplication. I also didn't replicate any known algorithm (at least not intentionally), but instead just improvised something (inefficient).

Gif compression is a bit funny, but you get the point. Simulation done by a C program, data plotted in matlab.
// #include <math.h>
#include <stdio.h>

#define PI 3.14159265358979323846264338327950288419716939937508


struct mycomplex {

  double real;
  double imag;
};

/* e^x is a function that grows at a rate proportional to its value */

/* really inefficient, but there's a more efficient one with taylor series below */
double r_exp(double x) {
  double r = 1;
  if(x>0)
    for(double y=0; y<x; y+=0.000002)
      r = r + r*0.000002;
  if(x<0)
    for(double y=0; y>x; y-=0.000002)
      r = r - r*0.000002;
  return r;
}

/* my routine for natural logarithm as inverse of e^x similarly to sqrt */
double my_log(double x) {
  double low = 0;
  double high = x;
  double neg = 1;
  if(x<1) {
    x = 1/x;
    high = x;
    neg = -1;
  }
  double value = (low + high)/2;

  for(int i=0; i<30; i++) {
    if(r_exp(value) < x)
      low = value;
    else
      high = value;
    value = (low + high)/2;
  }
  return neg*value;
}

/* x^y */
double my_pow(double x, double y) {
  return r_exp(y*my_log(x));
}

/* abs(x) */

double my_abs(double x) {
  if(x<0)
    return -x;
  else
    return x;
}

/* my routine for sqrt */

double my_sqrt(double x) {
  double low = 1;
  double high = x;
  double root = (low + high)/2;
  if(x<1) {
    low = x;
    high = 1;
  }
  for(int i=0; i<30; i++) {
    if(root*root < x)
      low = root;
    else
      high = root;
    root = (low + high)/2;
  }
  return root;
}

/*

double my_sqrt(double x) {
  return my_pow(x, 0.5);
}
*/

/* function for taking a modulo for floating point numbers */

double my_fmod(double in, double n) {
  if(in<0)
    n = -n;
  while(in>n)
    in += n;
  return in;
}

/* my routine for sine */

double my_sin(double a) {
  double l = 0, x0 = 0, y0 = 1, x = 0, y = 1, neg = 1.0;

  /* utilize symmetries to only calculate quarter */

  while(a<0) {
    a = a + 2*PI;
  }
  a = my_fmod(a, 2*PI);
  if(a>PI) {
    neg = -neg;
    a = 2*PI-a;
  }
  if(a>PI/2)
    a = PI-a;

  /* integrate perimeter length until it corresponds to given angle */

  while(l<a) {
    x = x + 0.000005;
    y = my_sqrt(1-x*x);
    l = l + my_sqrt((x-x0)*(x-x0)+(y-y0)*(y-y0));
    x0 = x;
    y0 = y;
  }

  return neg*x;

}

/* integrate the perimeter length until x/y corresponds to r */

double my_atan(double r) {
  double l = 0, x0 = 0, y0 = 1, x = 0, y = 1;
  while(x/y<r) {
    x = x + 0.000002;
    y = my_sqrt(1-x*x);
    l = l + my_sqrt((x-x0)*(x-x0)+(y-y0)*(y-y0));
    x0 = x;
    y0 = y;
  }
  return l;
}

/* my routine for multiplying two complex numbers */

struct mycomplex my_mul(struct mycomplex a, struct mycomplex b) {
  struct mycomplex out;

  out.real = a.real * b.real - a.imag * b.imag;

  out.imag = a.imag * b.real + a.real * b.imag;

  return out;

}

/* my routine for taking exp(z), where z is complex valued vector */

struct mycomplex my_exp(double real, double imag) {
  struct mycomplex out;

  out.real = r_exp(real)*my_sin(imag+PI/2);

  out.imag = r_exp(real)*my_sin(imag);

  return out;

}

/* my routine for constructing linear real valued vector */

my_linspace(double a, double b, int n, double out[]) {
  double df = (b-a)/(n-1);
  double f = a;
  for(int i=0; i<n; i++) {
    out[i] = f;
    f = f + df;
  }
}

main() {

  double k[800];
  struct mycomplex diff2[800];
  struct mycomplex tmp;
  struct mycomplex tmpb;
  struct mycomplex psi[800];
  struct mycomplex potential[800];

  /* just for testing of accuracy */

  /*
  printf("my_sqrt(2)=%f sqrt(2)=%f\n", my_sqrt(2), sqrt(2));
  printf("my_sin(pi/4)=%f sin(pi/4)=%f\n", my_sin(PI/4), sin(PI/4));
  printf("4*my_atan(1)=%f 4*atan(1)=%f\n", 4*my_atan(1), 4*atan(1));
  printf("my_exp(1)=%f exp(1)=%f\n", r_exp(1), exp(1));
  printf("my_exp(-1)=%f exp(-1)=%f\n", r_exp(-1), exp(-1));
  exit(0);
  */

  /* prepare a potential barrier */

  for(int i=0; i<800; i++) {
    potential[i].real = 0;
    potential[i].imag = 0;
  }
  for(int i=390; i<410; i++)
    potential[i].real = 0.05;

  my_linspace(0, 50, 800, &k);


  /* prepare initial wave function */

  for(int i=0; i<800; i++) {
    psi[i].real = r_exp(-0.07*(k[i]-12)*(k[i]-12));
    tmp = my_exp(0, -900*k[i]);
    psi[i] = my_mul(psi[i], tmp);
    psi[i].real = psi[i].real/8.7;
    psi[i].imag = psi[i].imag/8.7;
    // printf("%f\n", i/800.0);
  }

  /* evolve */

  for(int t=0; t<2000000; t++) {
    diff2[0].real = 0;
    diff2[0].imag = 0;
    for(int i=1; i<799; i++) {
      diff2[i].real = (psi[i+1].real-psi[i].real)-(psi[i].real-psi[i-1].real);
      diff2[i].imag = (psi[i+1].imag-psi[i].imag)-(psi[i].imag-psi[i-1].imag);
    }
    diff2[799].real = 0;
    diff2[799].imag = 0;
    for(int i=0; i<800; i++) {
      tmp = my_mul(potential[i], psi[i]);
      tmpb.real = diff2[i].real - tmp.real;
      tmpb.imag = diff2[i].imag - tmp.imag;
      tmp.real = 0;
      tmp.imag = 0.001;
      tmp = my_mul(tmp, tmpb);
      psi[i].real = psi[i].real + tmp.real;
      psi[i].imag = psi[i].imag + tmp.imag;
    }
    if(t%1000==1) {
      for(int i=0; i<800; i++)
printf("%f, %f\n", psi[i].real, psi[i].imag);
    }
  }
}

--

Actually, you only need complex valued exponential function and some iterative inversions to calculate pretty much anything (normal).

--
#include <math.h>
#include <stdio.h>
#include <complex.h>

#define PI 3.14159265358979323846264338327950288419716939937508

/* iteratively invert a growing function with a and b as limits */
double inv(double (*f)(), double x, double a, double b) {
  for(int i=0; i<20; i++)
    if(f((a+b)/2)<x) a = (a+b)/2;
    else b = (a+b)/2;
  return (a+b)/2;
}

/* integrate from definition: e^z = de^z/dz, z^0 = 1 */
double complex my_exp(double complex z) {
  double complex v = 1;

  for(double a=0; a<1; a+=1/1e5)
    v = v + v*(z/1e5);
  return v;
}

/* more efficient (taylor series), less intuitive e^z */
double complex alt_exp(double complex z) {
  double complex v = 1, w = 1;
  for(int k=1; k<20; k++)
    v += (w*=z/k);
  return v;
}

double real_my_exp(double x) { return creal(my_exp(x)); }

double my_log(double x) {
  if(x<1) return -my_log(1/x);
  return invert(real_my_exp, x, 0, x);
}

double my_sq(double x) { return x*x; }

double my_sqrt(double x) {
  if(x>1) return invert(my_sq, x, 1, x);
  return invert(my_sq, x, x, 1);
}

double my_sin(double x) { return cimag(my_exp(I*x)); }
double my_cos(double x) { return creal(my_exp(I*x)); }
double my_tan(double x) { return my_sin(x)/my_cos(x); }
double my_cot(double x) { return my_cos(x)/my_sin(x); }
double my_pow(double x, double y) { return creal(my_exp(y*my_log(x))); }
double my_sinh(double x) { return (creal(my_exp(x))-creal(my_exp(-x)))/2; }
double my_cosh(double x) { return (creal(my_exp(x))+creal(my_exp(-x)))/2; }
double my_tanh(double x) { return my_sinh(x)/my_cosh(x); }
double my_coth(double x) { return my_cosh(x)/my_sinh(x); }
double my_log10(double x) { return my_log(x)/my_log(10); }

double my_atan(double x) {
  if(x<0) return -my_atan(-x);
  return invert(my_tan, x, 0, 1.6); /* 1.6 is just some value above pi/2 */
}

double my_asin(double x) { return my_atan(x/my_sqrt(1-x*x)); }
double my_acos(double x) { return 2*my_atan(1)-my_atan(x/my_sqrt(1-x*x)); }

/* alternative sin by integration of perimeter until y corresponds to a*/
double alt_sin(double a) {
  double c, x = 1, y = 0, xn = 1, yn = 0, l = 0, dl;

  /* utilize symmetries */
  while(a<0) a = a + 2*PI;
  while(a>2*PI) a = a - 2*PI;
  if(a>PI) return -alt_sin(2*PI-a);
  if(a>PI/2) return alt_sin(PI-a);

  /* integrate the perimeter length */
  while(l<a) {
    x = x - 1e-5;
    y = sqrt(1-x*x);
    dl = sqrt((x-xn)*(x-xn)+(y-yn)*(y-yn));
    l = l + dl;
    xn = x;
    yn = y;
  }
  return y;

}

/* alternative atan by integrating the perimeter length until x/y corresponds to v */
double alt_atan(double v) {
  double l = 0, x0 = 0, y0 = 1, x = 0, y = 1;
  if(v<0) return -alt_atan(-v);
  while(x/y<v) {
    x = x + 1e-5;
    y = sqrt(1-x*x);
    l = l + sqrt((x-x0)*(x-x0)+(y-y0)*(y-y0));
    x0 = x;
    y0 = y;
  }
  return l;
}

/* discrete Fourier transform: F(w) = sum(f(t)e^(-iwt)) */
int dft(double complex *a, double complex *b, int n) {
  for(int m=0; m<n; m++) {
    b[m] = 0;
    for(int t=0; t<n; t++) /* w = 2*PI*m/n */
      b[m] = b[m] + a[t]*cexp(-I*2*PI*m*t/n); /* (a+bi)*(c+di) */
  }
}

/* more efficient, less intuitive Fourier transform */
int fft(double complex a[], double complex b[], int n, int step) {
  double complex t;
  if(step==1) for(int i=0; i<n; i++) b[i] = a[i];
  if(step<n) {
    fft(b, a, n, step * 2);
    fft(b + step, a + step, n, step * 2);
    for(int i=0; i<n; i+=2*step) {
      t = cexp(-I*PI*i/n)*a[i+step];
      b[i/2] = a[i]+t;
      b[(i+n)/2] = a[i]-t;
    }
  }
} /* notice that this fft alters the input vector */

int main() {
  double complex a[] = {1, 2, -1, 4};
  double complex b[4];

  printf("Function  \tMy        \tC       \tAlt\n");
  printf("exp(1)    \t%f\t%f\t%f\n", creal(my_exp(1)), exp(1), creal(alt_exp(1)));
  printf("exp(-1)   \t%f\t%f\t%f\n", creal(my_exp(-1)), exp(-1), creal(alt_exp(-1)));
  printf("sqrt(2)   \t%f\t%f\n", my_sqrt(2), sqrt(2));
  printf("sqrt(0.5) \t%f\t%f\n", my_sqrt(0.5), sqrt(0.5));
  printf("log(2)    \t%f\t%f\n", my_log(2), log(2));
  printf("log(0.5)  \t%f\t%f\n", my_log(0.5), log(0.5));
  printf("atan(1)   \t%f\t%f\t%f\n", my_atan(1), atan(1), alt_atan(1));
  printf("atan(-1)  \t%f\t%f\t%f\n", my_atan(-1), atan(-1), alt_atan(-1));
  printf("\n");

  dft(a, b, 4);
  printf("Discrete Fourier Transform of 1 2 -1 4\n");
  for(int i=0; i<4; i++)
    printf("%f\t%f\n", creal(b[i]), cimag(b[i]));
  printf("\n");

  printf("Fast Fourier Transform of 1 2 -1 4\n");
  fft(a, b, 4, 1);
  for(int i=0; i<4; i++)
    printf("%f\t%f\n", creal(b[i]), cimag(b[i]));
}

Wednesday, 9 November 2016

Being present is being connected to All Things.

If the many worlds interpretation of quantum mechanics is in fact true then the universe is deterministic, but we are faced with an interesting philosophical question of identity. Since all possible outcomes exist simultaneously, it's not surprising we find ourselves asking and existing as the question must be asked by those who exist, can and do ask it, wherever and whenever. However, why exactly does our life as an individual take this particular path instead of some other? For physics they're all equal. Futhermore, if time doesn't truly exist, why/how do we experience present and flow of time?


True free will cannot exist in a deterministic universe and therefore our path cannot be determined by one. If there existed no subjective experience of specific consciousness then the question would perhaps vanish. From purely physical point of view, I suppose there doesn't have to be anything special about every possible past, present and future existing simultaneously, but from the point of view of our consciousness, it's deeply mysterious. It may of course be that in some way consciousness is just an illusion and there is nothing special about this particular experience. Though, the illusion does appear to be extremely convincing.

--

Occasionally one runs into discussions about the simulation argument according to which we almost certainly live in a simulation because if simulations are possible and run then there are going to be very large amounts of them. While this is certainly somewhat entertaining argument, there isn't particularly much one can deduce from it. Whether we are in a simulation or not tells us nothing about where these simulations ultimately originate from and also doesn't tell us anything about our place in the hierarchy of the simulations (for example how deep we are from the fundamental underlying universe), unless of course we can somehow acquire empirical knowledge concerning them.

Quinine in tonic water converting 405nm (violet) laser light into 450nm (blue) by fluorescence. Diluting tonic water down to a single quinine molecule should allow antibunching to be observed by a detector capable of resolving single photons on timescales less than fluorescence lifetime of 20ns. Only a single photon from a single emitter on average within fluorescence lifetime can be emitted regardless of the number of photons in the exiting laser pulse.
Also, what might be worth considering is that at least in this particular universe (or simulation) all systems whether they be simulations or not, appear to interact with their environment to some extent and it is in fact impossible to create a perfectly isolated systems. This is why for example row hammer exploit [https://en.wikipedia.org/wiki/Row_hammer] is possible. Therefore no simulation is fundamentally any different from just a weakly coupled system in the most fundamental underlying universe. In certain sense creatures living in a simulation are then nothing more than caged animals born in captivity. Not that different from what we are now (as we are also caged by at least the limits of our current physical bodies and consciousness). Of course no particular reason why this couldn't change in the end.

Monday, 24 October 2016

What ought to be done?

What we are forced to ask every now and then is, what do we truly want?

This question kind of contains all meaningful questions concerning morality, ethics, right and wrong and in general all conceivable oughts. Even when we ask if we have the right to decide this for some other species, we're simply asking what we truly want - what kind of rights we wish to grant the other species. It's all on us whether we want it or not.
Of course we also have to ask ourselves more specific questions like what we want as a group or as a species and at the same time what we want as individuals, but these are simply extension of the "other species". These are the only meaningful prescriptive questions. Even if you're a religious person, the situation doesn't change very much. Your deity might act as an additional source of prescription to you and you might think you have access to their prescription as a description, but I posit that you are still faced with the exact same questions as the rest of us who don't believe. You need to ask yourself how you wish to value your supposed deity's prescription and determine what, if any, describes your deity's prescription most accurately. It's all on you. Even the methods are exactly the same, your very own reason and judgement.

What is the origin of their will and motivation ultimately? Why they feel thighs ought to be one way instead of the other? My limited understanding is that our motivation is a result of natural selection, history of our species, our personal histories and partly because of the history of our societies. However, going back even further, it would appear that these are simply arbitrary coincidences, some of which have served our species well in the battle for survival, some less so.

These are arbitrary preferences. Generally people prefer to continue to exist and avoid suffering for example, but what is generally considered moral varies from group to group and the extent that it doesn't vary, appears to be mostly simply due to our biological similarity.

Knowing this does not limit us from acknowledging the consequences, for example, we understand it is likely in our interest to grant certain degree of equality to other people, given we don't know how our own lives are going to evolve. We might be the other people one day. It's like gambling, but for a rational person, it's not really gambling, it's investing. It could fail, but it's still better to play the stock market than it is to play the lottery.

Unavoidable conflicts between dissimilar groups are perfectly expected, but luckily most groups are at least somewhat rational and optimize by compromising. However, it is conceivable that conflicts that cannot be solved by negotiation might emerge. These are normally called wars and the worst ones are about survival and extermination rather than anything that could be reasoned.

Once we've determined what we want as a species, we only need to figure out how to best approach that goal. There basically exists only a single method to answer these question for us - science. Science is nothing more than a name for the rational process of fishing out the best model out of all the possible descriptions out there by any means imaginable. Science gives us a description of the universe including its inhabitants - us, and tells us how to best achieve our goals and what outcomes to expect given specific choices. It doesn't tell us what we ought to do. That task is left for us.

Every decision has consequences, typically both good and bad, often unavoidable. There are many ways to make a decision, none of which are necessarily any better than the other. We can aim for least suffering, most pleasure, least boredom, maximized fairness, longest life, maximum number of lives, maximum knowledge, maximum safety, etc. Many of these are mutually exclusive. Most pleasure could mean most suffering. Longest life could mean most boring life. Least suffering almost certainly means minimum number of lives. We can expect negative consequences due to our decisions as well as positive, there will almost certainly always be some of both. Maximizing the number of people is not going to maximize the quality of life for an individual, it might not even maximize the total sum of happiness. Not to mention it probably won't maximize the long term total sum considering all the generations to come who will have to live a life of scarcity when resources have been depleted by the previous generations. Some alternatives are obviously excluded, like maximum suffering. Although, it's not entirely clear we know how to do this either, because what is bad for the humanity now, might be good for the humanity later if we manage to save the planet and its resources for times when they can be more efficiently used. Economic growth tends towards faster depletion and increased rate of destruction. Diseases limit the number of people and save the environment. None of these alternatives are trivially good or bad. Never the less, to deny the nature of this answer, not to mention the existence of these questions and knowledge concerning them is to deny the truth and to deny who we are. We know that doing one thing now will favor some and hurt some others. Not deciding has its own consequences as well. That is the nature of the game. We shouldn't just ignore it.