components -> site

This commit is contained in:
Michael Peters 2024-08-12 21:02:53 -07:00
parent 834d4443dc
commit 7a986b3296
21 changed files with 111 additions and 113 deletions

View File

@ -1,4 +1,4 @@
# AI in the Browser
## In this Repo:
- [Snake Lab](src/components/snake) - [Live](https://beefslab.com/webapps/snake-lab)
- [Snake Lab](src/site/snake) - [Live](https://beefslab.com/webapps/snake-lab)

View File

@ -1,6 +1,6 @@
import { createRoot } from 'react-dom/client';
import App from './components/app';
import App from './site/app';
import './index.scss';

View File

@ -94,9 +94,7 @@ const SnakePage: FC = () => {
<div>5,000 snakes per generation</div>
<div>Press Spacebar for Slow Motion</div>
<div>
<a href="https://git.beefslab.com/michael/webai/src/branch/master/src/components/snake">
View Repo
</a>
<a href="https://git.beefslab.com/michael/webai/src/branch/master/src/site/snake">View Repo</a>
</div>
</div>
</div>

View File

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

@ -1,4 +1,4 @@
import { alignGenome, compatibilityDistance } from '../components/snake/brain-neat';
import { alignGenome, compatibilityDistance } from '../site/snake/brain-neat';
import { assert, addTest } from './tests';
function testAlignGenome() {

View File

@ -1,5 +1,5 @@
import IOSet from "../components/snake/ioset";
import { addTest, assert, assertArrayEqual } from "./tests";
import IOSet from '../site/snake/ioset';
import { addTest, assert, assertArrayEqual } from './tests';
function testOrderMaintained() {
const s = new IOSet();

View File

@ -1,4 +1,4 @@
import { Network, Edge, Node, RawEdge } from '../components/snake/network';
import { Network, Edge, Node, RawEdge } from '../site/snake/network';
import { addTest, assert, assertArrayEqual } from './tests';
function testEdgesToNodesBasic() {
@ -151,7 +151,7 @@ function testCopyNodesPreventsModify() {
const nodeA = nodes.get('A')!;
const nodeACopy = nodesCopy.get('A')!;
nodeACopy.dsts.pop()
nodeACopy.dsts.pop();
assert(nodeA.dsts.size === 1);
assert(nodeACopy.dsts.size === 0);