elea

所属分类:collect
开发工具:JavaScript
文件大小:0KB
下载次数:0
上传日期:2021-09-04 06:05:20
上 传 者sh-1993
说明:  发明新的EA和GA,或向学生展示它们的工作原理。当前部署于
(Invent new EAs and GA or show your students how they work. Currently deployed on)

文件列表:
Dockerfile (229, 2021-03-15)
static/ (0, 2021-03-15)
static/build/ (0, 2021-03-15)
static/build/blockly_compressed.js (641535, 2021-03-15)
static/build/blockly_compressed.js.map (1232095, 2021-03-15)
static/build/blockly_uncompressed.js (40857, 2021-03-15)
static/build/blocks_compressed.js (76429, 2021-03-15)
static/build/blocks_compressed.js.map (102477, 2021-03-15)
static/build/javascript_compressed.js (42397, 2021-03-15)
static/build/javascript_compressed.js.map (61501, 2021-03-15)
static/build/msg/ (0, 2021-03-15)
static/build/msg/js/ (0, 2021-03-15)
static/build/msg/js/ab.js (41080, 2021-03-15)
static/build/msg/js/ar.js (39100, 2021-03-15)
static/build/msg/js/az.js (36420, 2021-03-15)
static/build/msg/js/ba.js (41131, 2021-03-15)
static/build/msg/js/bcc.js (41372, 2021-03-15)
static/build/msg/js/be-tarask.js (42445, 2021-03-15)
static/build/msg/js/be.js (42356, 2021-03-15)
static/build/msg/js/bg.js (42273, 2021-03-15)
static/build/msg/js/bn.js (43700, 2021-03-15)
static/build/msg/js/br.js (35337, 2021-03-15)
static/build/msg/js/ca.js (35321, 2021-03-15)
static/build/msg/js/cs.js (35081, 2021-03-15)
static/build/msg/js/da.js (34893, 2021-03-15)
static/build/msg/js/de.js (34965, 2021-03-15)
static/build/msg/js/diq.js (35782, 2021-03-15)
static/build/msg/js/dty.js (41195, 2021-03-15)
static/build/msg/js/ee.js (37372, 2021-03-15)
static/build/msg/js/el.js (46028, 2021-03-15)
static/build/msg/js/en-gb.js (35889, 2021-03-15)
static/build/msg/js/en.js (32724, 2021-03-15)
static/build/msg/js/eo.js (34685, 2021-03-15)
static/build/msg/js/es.js (35390, 2021-03-15)
static/build/msg/js/et.js (34780, 2021-03-15)
static/build/msg/js/eu.js (36557, 2021-03-15)
static/build/msg/js/fa.js (41425, 2021-03-15)
static/build/msg/js/fi.js (34615, 2021-03-15)
... ...

# elea This is a little tool designed to prototype evolutionary algorithms, get an intuition for runtimes or for teaching EAs to students. ## Run - Use `go run webserver.go` - If you don't have go installed on your system or prefer to use docker, run: `docker build . -t elea` followed by `docker run -p 8080:8080 elea` ## Write new blocks Steps: 1. Think of all the connections you need and build your block in the [block factory](https://blockly-demo.appspot.com/static/demos/blockfactory/index.html): 2. Copy the json definition into the `newblocks.js` or similar JS file and include it 3. Also copy the JS code stub from the factory into this JS file. 4. Add the block to the toolbox in any category via its name (roughly in lines 5-150 in index.html). You should now be able to see it in the toolbox and use it. 5. In order to actually do something, you need to replace the generated code with actual code. I essence, you need to return valid JS code in a string (ES5). Since debugging parsing errors is rather hard in this environment I suggest to try atomic expressions you want to use in [this live demo](https://neil.fraser.name/software/JS-Interpreter/). Anything that does not work there will not work in blockly either. Goodbye arrow-functions and other syntactic sugar of ES6! 6. You should now have a working block Additional things to consider: Variables and functions could collide with user defined objects. Blockly can handle this for you, if you let it. You need to ask for valid names etc. In its current state, the documentation is barely understandable and does not prominently mention all necessary functions, I find the predefined open source blocks much more helpful: https://github.com/google/blockly/blob/master/generators/javascript/math.js

近期下载者

相关文件


收藏者