Risk#
Broligarchy#
Making achievement great again
Show code cell source
import numpy as np
import matplotlib.pyplot as plt
import networkx as nx
# Define the neural network structure
layers = {
'Input': ['Resourcefulness', 'Resources'],
'Hidden': [
'Identity (Self, Family, Community, Tribe)',
'Tokenization/Commodification',
'Adversary Networks (Biological)',
],
'Output': ['Joy', 'Freude', 'Kapital', 'Schaden', 'Ecosystem']
}
# Adjacency matrix defining the weight connections
weights = {
'Input-Hidden': np.array([[0.8, 0.4, 0.1], [0.9, 0.7, 0.2]]),
'Hidden-Output': np.array([
[0.2, 0.8, 0.1, 0.05, 0.2],
[0.1, 0.9, 0.05, 0.05, 0.1],
[0.05, 0.6, 0.2, 0.1, 0.05]
])
}
# Visualizing the Neural Network
def visualize_nn(layers, weights):
G = nx.DiGraph()
pos = {}
node_colors = []
# Add input layer nodes
for i, node in enumerate(layers['Input']):
G.add_node(node, layer=0)
pos[node] = (0, -i)
node_colors.append('lightgray')
# Add hidden layer nodes
for i, node in enumerate(layers['Hidden']):
G.add_node(node, layer=1)
pos[node] = (1, -i)
if node == 'Identity (Self, Family, Community, Tribe)':
node_colors.append('paleturquoise')
elif node == 'Tokenization/Commodification':
node_colors.append('lightgreen')
elif node == 'Adversary Networks (Biological)':
node_colors.append('lightsalmon')
# Add output layer nodes
for i, node in enumerate(layers['Output']):
G.add_node(node, layer=2)
pos[node] = (2, -i)
if node == 'Joy':
node_colors.append('paleturquoise')
elif node in ['Freude', 'Kapital', 'Schaden']:
node_colors.append('lightgreen')
elif node == 'Ecosystem':
node_colors.append('lightsalmon')
# Add edges based on weights
for i, in_node in enumerate(layers['Input']):
for j, hid_node in enumerate(layers['Hidden']):
G.add_edge(in_node, hid_node, weight=weights['Input-Hidden'][i, j])
for i, hid_node in enumerate(layers['Hidden']):
for j, out_node in enumerate(layers['Output']):
# Adjust thickness for specific edges
if hid_node == "Identity (Self, Family, Community, Tribe)" and out_node == "Kapital":
width = 6
elif hid_node == "Tokenization/Commodification" and out_node == "Kapital":
width = 6
elif hid_node == "Adversary Networks (Biological)" and out_node == "Kapital":
width = 6
else:
width = 1
G.add_edge(hid_node, out_node, weight=weights['Hidden-Output'][i, j], width=width)
# Draw the graph
plt.figure(figsize=(12, 8))
edge_labels = nx.get_edge_attributes(G, 'weight')
widths = [G[u][v]['width'] if 'width' in G[u][v] else 1 for u, v in G.edges()]
nx.draw(
G, pos, with_labels=True, node_color=node_colors, edge_color='gray',
node_size=3000, font_size=10, width=widths
)
nx.draw_networkx_edge_labels(G, pos, edge_labels={k: f'{v:.2f}' for k, v in edge_labels.items()})
plt.title("Greateful (Static) vs. Pushing (Dynamic)")
plt.show()
visualize_nn(layers, weights)