Arthur O'Dwyer
8171b68cbe
Remove some unused global variables. NFC.
2017-04-18 01:12:20 -07:00
Arthur O'Dwyer
6fcf2f3350
git rm grouprun.py
2017-04-18 01:12:20 -07:00
Arthur O'Dwyer
d60ba5277c
Remove a crash-causing line in slipnet.py.
...
Without this patch, `python main.py abc aabbcc milk` will reliably crash.
I believe what happens here is that we initialize all the slipnodes and
everything, and then `slipnet.predecessor` becomes `None`, which means
that if that concept ever arises on its own (vs. arising as the "opposite"
of "successor"), we'll be passing around `None` instead of a proper `Slipnode`
and everything goes sideways.
This line doesn't correspond obviously to anything in the Java code,
so I think it's just bogus --- an experiment in "brain damage" that was
accidentally committed?
2017-04-18 01:07:51 -07:00
Arthur O'Dwyer
0ff9d49111
Further Pythonicity and flake8 cleanup. NFC.
2017-04-16 18:22:57 -07:00
Arthur O'Dwyer
31323cd2bc
Add some end-to-end tests!
...
These tests are intended to protect against regressions in the high-level
behavior of Copycat. They're not super precise, and they're VERY slow.
2017-04-16 18:22:57 -07:00
Arthur O'Dwyer
8e10814802
Further Pythonicity; and remove a bunch of logging from the inner loop.
2017-04-16 01:19:36 -07:00
Arthur O'Dwyer
77bfaaf5a7
Further refactor the main harness. Print average time for each solution.
2017-04-16 00:55:18 -07:00
Arthur O'Dwyer
3103f54ada
Untie some loopy logic in addCodelet. (Functional change!)
2017-04-15 23:08:12 -07:00
Arthur O'Dwyer
e094160dcd
More Pythonic cleanups. NFC.
2017-04-15 23:07:28 -07:00
Arthur O'Dwyer
a2260cdaf6
Run multiple iterations. Print final temperatures. Reduce stdout spew.
...
This makes the output of the program more closely resemble that of the
original Copycat described in "FCCA" page 236:
> [T]he average final temperature of an answer can be thought of as
> the program's own assessment of that answer's quality, with lower
> temperatures meaning higher quality.
For example, running `python main.py abc abd ijk 100` produced the
following output:
ijl: 98 (avg temp 16.0)
jjk: 1 (avg temp 56.3)
ijk: 1 (avg temp 57.9)
And for `python main.py abc abd ijkk 100`:
ijkkk: 2 (avg temp 19.8)
ijkl: 51 (avg temp 28.1)
ijll: 46 (avg temp 28.9)
djkk: 1 (avg temp 77.4)
2017-04-15 22:29:46 -07:00
Arthur O'Dwyer
ed1d95896e
More Pythonic idioms in coderackPressure.py.
...
No functional change.
2017-04-15 22:29:46 -07:00
Arthur O'Dwyer
88ee2ddd8d
Spelling: neighbour -> neighbor.
...
The old code mixed both spellings; we might as well be consistent.
2017-04-15 22:29:46 -07:00
Arthur O'Dwyer
5735888d02
Minor Pythonicity cleanups.
...
No functional change.
2017-04-14 11:37:43 -07:00
Arthur O'Dwyer
69f75c3f42
Spelling: slipability -> slippability
...
No functional change.
2017-04-14 11:19:25 -07:00
J Alan Brogan
bcfd8a5a10
Ignore mccabe complexity smells
2015-10-28 01:34:16 +00:00
J Alan Brogan
c46e3b6db0
Allow more complex functions in Landscape
2015-10-28 01:29:43 +00:00
J Alan Brogan
52402b99b3
Add Landscape configuration
2015-10-28 01:25:54 +00:00
J Alan Brogan
aeb8cda755
Tidy references (which were broken by daeff3d) #5
2015-06-01 10:52:20 +01:00
J Alan Brogan
daeff3d9bf
Pylint the code
2014-12-22 23:44:09 +00:00
J Alan Brogan
a5930b486c
PEP 8 - line length
2014-12-22 20:18:54 +00:00
J Alan Brogan
39fb7fc9b7
outdent
2014-12-22 16:56:53 +00:00
J Alan Brogan
d4bb38b858
Github calls it sh, not shell
2014-12-22 16:56:16 +00:00
J Alan Brogan
98357913e9
Make a separate para of final instruction
2014-12-22 16:53:02 +00:00
J Alan Brogan
0f51434191
Better linkage #4
2014-12-22 16:50:15 +00:00
J Alan Brogan
c38102c02e
Extend readme to explain install & run, #4
2014-12-22 16:44:51 +00:00
J Alan Brogan
94a0ecae48
PEP 008, mostly lines too long
2014-12-22 16:38:10 +00:00
Alan Brogan
c0971ce029
Link to a license file actually breaks license
...
Namely "copyright notice and this permission notice shall be included in all copies"
2014-03-21 12:25:58 +00:00
Alan Brogan
e58e449be2
Consistent licencing across projects
2013-08-16 10:24:41 +01:00
Alan
331114ebc3
Merge pull request #3 from jtauber/master
...
improved PEP compliance and fixed errors preventing it from running
2012-12-10 07:59:00 -08:00
James Tauber
8332b1387e
fixed indentation problem
2012-12-01 02:15:25 -05:00
James Tauber
ab27b745be
fixed missing random imports
2012-12-01 02:13:31 -05:00
James Tauber
b939f3ec3f
fixed conceptual_depth for conceptualDepth
2012-12-01 02:12:22 -05:00
James Tauber
2281870cf2
removed unnecessary utils
2012-12-01 02:10:33 -05:00
James Tauber
33cf41b585
fix linter errors and warnings
2012-12-01 02:00:03 -05:00
James Tauber
cfaebd150f
tabs to spaces
2012-11-30 02:12:44 -05:00
James Tauber
1ca7f1839f
proper nouns don't take articles
2012-11-30 02:03:59 -05:00
J Alan Brogan
53149013cc
avoid duplicitous wording
2012-11-20 21:54:15 +00:00
J Alan Brogan
b7b2a738b0
Ignore filesystem and editor files
2012-11-20 21:53:54 +00:00
J Alan Brogan
86f0bf8016
Spell my own name correctly!
2012-10-26 18:25:24 +01:00
J Alan Brogan
b3d46f3a68
Don't ignore unused files
2012-10-26 18:22:34 +01:00
J Alan Brogan
feae97a988
Simpler returns
2012-10-26 18:20:26 +01:00
J Alan Brogan
331b1ad3eb
Separate out the main method
2012-10-26 18:20:15 +01:00
J Alan Brogan
073f4fe05c
I like to think Mr Hofstadter would appreciate the self-reference
2012-10-26 17:54:13 +01:00
J Alan Brogan
47c0b457b3
Add license
2012-10-26 17:50:00 +01:00
J Alan Brogan
b12ae322eb
Make a package from the python scripts
2012-10-26 17:40:20 +01:00
J Alan Brogan
d58dca3309
That's "Hofstadter" to me
2012-10-26 17:38:37 +01:00
J Alan Brogan
5462c033ab
Initial addition of Python scripts
2012-10-26 17:35:08 +01:00
Alan
90eb4a7b2a
Initial commit
2012-10-26 09:16:21 -07:00