Richard Harrington
3fe4444f7a
ATTN: commits now contain internal info. Changed register system to
...
mostly an interface.
Removed :val field from all registers except storage registers & INDEX.
Some of the other registers were already quite specialized, but
the ones that weren't -- the ones that relied on :val fields in the
register -- are now just interfaces to attributes stored on the top
level of the robot.
2013-08-09 00:51:42 -04:00
Richard Harrington
db63955567
removed passing of attributes from robot to init-register function. don't need them now.
2013-08-09 00:38:21 -04:00
Richard Harrington
cd2fc415ea
fixed slight bug in robot-field-read-register, in register namespace
2013-08-08 23:53:07 -04:00
Richard Harrington
abbc60d81c
added 'random' record to register, switched to mixin system for most records, got all existing tests working
2013-08-08 23:38:05 -04:00
Richard Harrington
74ab6affe3
fixed bug in pathfinder convenience functions in register
2013-08-08 23:23:36 -04:00
Richard Harrington
4d7fdb0cfb
converted registers to protocols and records. 2/3 finished.
2013-08-08 01:10:35 -04:00
Richard Harrington
382a70bd34
created register namespace, moved game_lexicom stuff into it
2013-08-07 11:36:03 -04:00
Richard Harrington
dc5531b3b5
removed kernel-lexicon dependency, moved all its data structures into assembler
2013-08-07 10:21:21 -04:00
Richard Harrington
f65ee493a9
added todo
2013-08-06 20:08:05 -04:00
Richard Harrington
b43eb26b37
fixed bug in robot.clj, all previous tests now working
2013-08-06 19:21:35 -04:00
Richard Harrington
f1b94518f7
Merge branch 'master' into robot
2013-08-06 18:35:44 -04:00
Richard Harrington
94c069116f
changed parameter-pass-in format to ppt in core.clj, to registers flattened in the argument list
2013-08-06 18:35:27 -04:00
Richard Harrington
7fd4baa3c2
fixed bug in ppt in core.clj causing it to refer to old hard-coded info rather than passed-in parameters
2013-08-06 18:35:05 -04:00
Richard Harrington
2b983b6080
in the midst of some changes to robot
2013-08-06 18:17:26 -04:00
Richard Harrington
9c4a576702
added to inspection functions in core.clj
2013-08-06 18:01:57 -04:00
Richard Harrington
40b1b4533d
fixed typo in namespace require section of robotwar.core
2013-08-06 18:00:51 -04:00
Richard Harrington
a30726aac2
added some distance, time and acceleration functions
2013-08-06 16:19:01 -04:00
Richard Harrington
6d16b1d4aa
changed todo list comments about registers still to be done
2013-08-06 16:18:33 -04:00
Richard Harrington
a26092a481
added default registers AIM, SPEEDX and SPEEDY
2013-08-06 16:17:37 -04:00
Richard Harrington
de7497691c
minor whitespace adjustment
2013-08-06 16:17:05 -04:00
Richard Harrington
154d3e70bc
added TICK_DURATION constant
2013-08-06 16:16:04 -04:00
Richard Harrington
5477c430d8
changed damage so it goes up instead of down
2013-08-06 13:06:37 -04:00
Richard Harrington
623bfea415
changed name of foundry namespace to assembler
2013-08-06 12:00:30 -04:00
Richard Harrington
54161691fa
made shorter aliases (without 'robotwar.' prefix) for all namespaces
2013-08-06 11:34:51 -04:00
Richard Harrington
4af58b61ab
changed robot module dependencies from 'use' to 'require'
2013-08-06 11:26:43 -04:00
Richard Harrington
8f1653bb66
bug fixed; all existing tests running. No tests yet for new special-purpose registers.
2013-08-05 21:53:51 -04:00
Richard Harrington
041a639203
wrote special-purpose registers: X, Y, DAMAGE, INDEX, DATA, RANDOM. Brain tests now failing.
2013-08-05 21:40:23 -04:00
Richard Harrington
8091e1f216
fixed typo, got push-test in brain-test working
2013-08-05 00:36:13 -04:00
Richard Harrington
42dade809c
updated the hacky inspection code in core.clj to work with the new robot and world apis
2013-08-05 00:35:17 -04:00
Richard Harrington
28efa906c2
got basic skeletons of robot and world up and running, all tests but one passing in brain-test
2013-08-05 00:26:05 -04:00
Richard Harrington
67f30c959c
changed keyword 'program' to 'obj-code' (more specific)
2013-08-04 22:48:13 -04:00
Richard Harrington
675c493609
removed commented out debugging line
2013-08-04 22:27:46 -04:00
Richard Harrington
edf835cd02
rearranged dependencies so the register names are known only to robot, and passed in function calls to brain
2013-08-04 22:18:24 -04:00
Richard Harrington
63256d8691
rearranged order of arguments to parse, parse-token and assemble, to make more sense
2013-08-04 22:08:20 -04:00
Richard Harrington
37deec17de
rearranged dependencies so that all calls to foundry/assemble are made from brain/init-brain, and higher levels pass in source code to init/brain
2013-08-04 21:36:33 -04:00
Richard Harrington
63d678f406
updated docstrings in brain.clj
2013-08-04 21:06:05 -04:00
Richard Harrington
c358ce0e54
changed robot.brain to require kernel-lexicon to be fully qualified.
2013-08-04 21:01:58 -04:00
Richard Harrington
1af74d1630
refactored parse and parse-token (parse-token is back to original)
2013-08-04 18:53:29 -04:00
Richard Harrington
5865a9f570
moved 'get-world' functionality (allows world-finding by world-tick-idx
...
and robot-idx) into helper function in brains-test
2013-08-03 14:14:32 -04:00
Richard Harrington
5eca3965cc
wrote informal inspection function for core.clj, that reports robot-states from a sequence of worlds, given world-tick-idx and robot-idx
2013-08-03 13:52:10 -04:00
Richard Harrington
817a3e057d
basic tests of branching and arithmetic passin, in brain-test
2013-08-03 12:30:47 -04:00
Richard Harrington
e2b4369960
continuing on apace with the gnarly refactoring (pretty much despairing of decent commit messages at this point)
2013-08-03 03:39:18 -04:00
Richard Harrington
0c988d61f4
commented out most of these high-level files till the refactoring is done
2013-08-03 03:38:28 -04:00
Richard Harrington
c43c0113a2
Merge branch 'master' into gnarly-refactoring
2013-08-02 18:12:58 -04:00
Richard Harrington
ea79c7bfd3
fully qualified required names in foundry.clj
2013-08-02 17:48:55 -04:00
Richard Harrington
134d5ac439
even more gruesome refactoring
2013-08-02 17:48:32 -04:00
Richard Harrington
9112c82dc6
making progress on refactoring, especially in brain (formerly robot). made new file called robot to represent external robot state
2013-08-02 01:36:17 -04:00
Richard Harrington
6e04c076a6
grinding along with the refactoring
2013-08-01 20:01:08 -04:00
Richard Harrington
4a8f83ad95
living on hope
2013-08-01 16:13:20 -04:00
Richard Harrington
08dcf38214
refactored, changed module names, untangled dependencies between kernel language and register names. Also removed 'repl'
2013-07-31 20:55:15 -04:00
Richard Harrington
d59467d2d2
rewrote doc string for make-instr-pair
2013-07-31 19:11:43 -04:00
Richard Harrington
2dbd496442
revised informal testing junk in core.clj
2013-07-31 17:38:55 -04:00
Richard Harrington
e1e25fcbe7
moved tokens' :line and :pos fields into the metadata map, refactored to preserve metadata, wrote a test for that
2013-07-31 17:38:33 -04:00
Richard Harrington
d37a87e810
minor change: for changing equality, moved from set notation to equals sign
2013-07-31 16:03:15 -04:00
Richard Harrington
e15147c679
rearranged indexing of registers
2013-07-31 14:56:01 -04:00
Richard Harrington
b331a43f79
changed name 'compile' to 'assemble', now don't have to exclude loading of clojure.core/compile
2013-07-31 14:30:40 -04:00
Richard Harrington
64cb83cb3b
altered informal testing junk in core.clj
2013-07-30 18:32:52 -04:00
Richard Harrington
5c15b98861
got simple printing of world almost working
2013-07-30 18:32:37 -04:00
Richard Harrington
4276409d9c
wrote init-world function to create a world-state
2013-07-30 11:44:36 -04:00
Richard Harrington
42676dff1c
added docstring to tick-robot
2013-07-30 08:23:05 -04:00
Richard Harrington
099e20d732
refactored tick-robot to use 'into' instead of multiple assocs and an increment function
2013-07-29 18:35:47 -04:00
Richard Harrington
b5ba742bc2
corrected registers-with-effect-on-world list again
2013-07-29 18:34:57 -04:00
Richard Harrington
52554ab4c5
added SPEEDX and SPEEDY to list of registers which have an effect on the world
2013-07-29 17:00:32 -04:00
Richard Harrington
a964ff9815
fixed bug causing ENDSUB not to parse properly; also added tests
2013-07-29 15:09:51 -04:00
Richard Harrington
6bc36bc579
loaded core.match
2013-07-29 15:09:05 -04:00
Richard Harrington
854359de18
minor change; restored testing with equals sign rather than tset literals for one item
2013-07-29 15:08:24 -04:00
Richard Harrington
27eeb56e83
altered parse and compile to add beginnings of error-checking framework (also added tests for this)
2013-07-29 12:57:20 -04:00
Richard Harrington
c20ed88809
extensive refactoring and shortening in create/map-labels
2013-07-29 11:46:27 -04:00
Richard Harrington
79149f8a8f
minor line clarity change in create/disambiguate-minus-signs
2013-07-29 11:45:42 -04:00
Richard Harrington
43a9a97078
refactored destructuring of function and let parameters in create/disambiguate-minus-signs
2013-07-29 11:44:57 -04:00
Richard Harrington
75b005aea9
refactored to use 'into' to merge hash-maps, instead of rebuilding them from scratch or doing multiple assocs
2013-07-29 11:40:59 -04:00
Richard Harrington
36e54daaed
added support for parsing multiple lines with comments; also added line number metadata, and tests for all this
2013-07-29 00:40:22 -04:00
Richard Harrington
fbc33868f9
rewrote create/repl to use pprint
2013-07-28 23:06:49 -04:00
Richard Harrington
184fd500b5
removed pretty-printing feature from robotwar.create; now that I have discovered pprint
2013-07-28 23:00:56 -04:00
Richard Harrington
9bfa7c213e
restored full 'robotwar' name everywhere, instead of 'rw'
2013-07-28 22:37:18 -04:00
Richard Harrington
dbd1007a84
shortened main namespace name from robotwar to rw
2013-07-28 01:31:03 -04:00
Richard Harrington
abae4d35b0
converted to proper ns macro format
2013-07-28 01:19:55 -04:00
Richard Harrington
b0fb5d6147
almost got robot-tick function working
2013-07-25 12:53:10 -04:00
Richard Harrington
4cfac7d461
wrote map-labels function to map the labels in a token-string. including tests.
2013-07-22 23:03:57 -04:00
Richard Harrington
411b9013ef
changed robotwar files & folders to remove 'hs-' prefix
2013-07-19 16:34:44 -04:00