Show newer

re: AI 

@freemo

# Module: Iced Quinn, 2021 # Algorithm: Jeffrey Phillips Freeman, 2017 # https://jeffreyfreeman.me/hyperassociative-map-explanation/ import math, random # chi: ideal distance between nodes # sigma: how strong unrelated nodes repel one another; smaller is stronger # nu: learning rate # beta: alignment threshold; stop when movement in an iteration falls below this # neighbors: any vertex connected by an edge to this one # non-neighbor: other vertices who are not connected by an edge # TODO don't take sqrts and use pre-squared values; saves time const Nu = 0.05 Beta = 0.005 type Vertex* = object x*, y*: float edges*: seq[int] Edge* = object v1*, v2*: int length*: float Solver* = object chi*, sigma*: float vertices*: seq[Vertex] edges*: seq[Edge] rng*: Rand func add*(self: var Solver; v: Vertex) {.inline.} = self.vertices.add v func add*(self: var Solver; e: Edge) {.inline.} = self.edges.add e self.vertices[e.v1].edges.add self.edges.high self.vertices[e.v2].edges.add self.edges.high func mag(s: varargs[float]): float = result = 0 for k in s: result += (k * k) result = sqrt(result) func relates(self: Edge; v: int): bool = result = false if self.v1 == v: return true if self.v2 == v: return true func opposite(self: Edge; v: int): int = if v == self.v1: return self.v2 if v == self.v2: return self.v1 # TODO find proper exception raise new_exception(Defect, "Vertex was not in edge") func set_defaults*(self: var Solver) = self.chi = 1 self.sigma = 2 func validate(self: Edge) = assert self.length > 0 func validate(self: Solver) = assert self.sigma > 1 func randomize(self: var Solver) = # TODO somehow check if the randomizer is uninitialized, as that will cause an infinite lockup for i in 0..<self.vertices.len: self.vertices[i].x = self.rng.gauss() self.vertices[i].y = self.rng.gauss() iterator neighbors(self: Solver; vi: int): lent Vertex = # yield only nodes which do share edges with v_i for ei in self.vertices[vi].edges: yield self.vertices[opposite(self.edges[ei], vi)] iterator neighbors_edge(self: Solver; vi: int): (lent Vertex, float) = # yield only nodes which do share edges with v_i for ei in self.vertices[vi].edges: yield (self.vertices[opposite(self.edges[ei], vi)], self.edges[ei].length) iterator not_neighbors(self: Solver; vi: int): lent Vertex = # yield only nodes which do not have edges with v_i for i in 0..<self.vertices.len: block mushroom: for ei in self.vertices[i].edges: if relates(self.edges[ei], vi): break mushroom yield self.vertices[i] func align(self: var Solver; vi: int): (float, float) = var v = addr self.vertices[vi] let px = v.x let py = v.y var dpx = 0.0 var dpy = 0.0 for (m, chi) in neighbors_edge(self, vi): let qx = m.x - px let qy = m.y - py let q = mag(qx, qy) dpx += qx * (((q - chi) * Nu) / q) dpy += qy * (((q - chi) * Nu) / q) for m in not_neighbors(self, vi): let qx = m.x - px let qy = m.y - py let q = mag(qx, qy) var cx = qx * (-Nu / (pow(q, self.sigma + 1))) var cy = qy * (-Nu / (pow(q, self.sigma + 1))) let c = mag(cx, cy) if c > self.chi: cx *= (self.chi / c) cy *= (self.chi / c) dpx += cx dpy += cy return (dpx, dpy) func align_all(self: var Solver): float = result = 0 for i in 0..<self.vertices.len: var v = addr self.vertices[i] let (dpx, dpy) = align(self, i) let dp = mag(dpx, dpy) if dp > result: result = dp v.x += dpx v.y += dpy func solve*(self: var Solver) = validate(self) debugecho "> randomizing" randomize(self) debugecho "> solving" var i = 0 let target = Beta * self.chi while true: let energy = align_all(self) inc i debugecho i, ",", energy if energy < target: break # optional: could recenter the graph if you wanted

Here are two pictures from the inside, one shows the room with all the beds for all the villagers who are just waking up.

Show thread

This is a picture of my animal trap outside I used to capture animals and eventually get them inside.

Show thread

These pictures are several views from the roof of the structure and one of the view of the spiral staircase on the way down.

Show thread

I revived an old I played a few years ago. I didn't have any photos saved so I wanted to snatch some screenshots. If anyone wants to see more pictures I will reply with some bonus pictures.

The design was a glass "fortress" in the clouds. It has a glass spiral staircase going up to one block above the cloud line and then the structure is made of glass. It contains villagers, a gollum, a machine that automatically breeds and kills chickens for an endless supply of food, sheep, cows, and all the accessories. Has about 20 villagers, a portal, and is draped in lava and water flowing down.

There is also an extensive underground structure with mushrooms and other stuff. There is also a "trap" outside where world-spawned animals get trapped and then a gate to herd them into the interior of the structure. so I have several more animals (mostly llamas) trapped in an underground chamber.

The attached pictures are of the fortress from a few angles from the outside (more pictures in the replies)

Am I the only one who thinks this galaxy looks like a but hole on chill night?

Physics explains why humans can walk through crowded places and not spill their coffee – Physics World
physicsworld.com/physics-expla
They found that for weak oscillations, there was a sharp switch between in phase and antiphase control at the system’s resonant frequency – something that they said can be fully understood using linear systems control theory. For stronger oscillations, the duo discovered a transition region, rich in behaviour, where the motions of the cart and pendulum are not synchronized.

@freemo I've actually though the same since I was a kid because too many of them dismissed my symptoms which I had googled and found the cause but couldn't confirm until I was old enough to pay for tests they wouldn't give me because "google didn't go to medical school".

@johnabs
@freemo

i pasted the rules here in a hedgedoc. the document is freely editable for everyone..if you want to make changes or add to it, feel free to ;-)

hedgedoc.satoshishop.de/pSkm0a

@johnabs

i try to stick to my rules, when debating and point out logic fallacys if i spot one.

this give more structure to the debate and helps me stay sane, i guess xD

@freemo

@freemo Tell me about it. I hate getting in discussions with people who don't understand logic well. It's necessary to try to make society a more reasonable place , but arguing with people who reason backwards (from conclusion first) or from emotion is incredibly frustrating.

@freemo @M0YNG @hans_w

Does that mean that the plants that grow in the soil are cannibals?

I wonder just how many miles of the surface of the planet at this point is dead life. Soil. afterall, is mostly dead and long since decayed leaves, trees, plants, and animals.

Me: All facts are true.

Every republican and democrat in unison: FALSE!

@freemo

I just heard today that plants are made mostly of air, and a little water. Most of the structure of plants are carbon from CO2, and hydrogen from the rain. Just a very small amount is minerals from the soil.

@freemo
And almost 9 pounds of water ( if I did my math right)

Interesting fact of the day: One gallon of gasoline weighs 6.3 lbs and when burned produces 20 lbs of CO2

Show older
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.