chalmerlowe / jarvis_ii Goto Github PK
View Code? Open in Web Editor NEWData Analysis Tutorials created by The Dark Art of Coding
Data Analysis Tutorials created by The Dark Art of Coding
organize the sample puzzles... easy medium hard.
right now, there is no organization to the puzzles. need to reorg them in loose groupings of easy, medium and hard.
So right now, the code for making rising/falling tokens looks something like this:
def rising_falling(n=6, rising=True):
'''Return a sequence of numbers that are rising (each subsequent number is
equal to or larger than the previous number) OR falling (each subsequent
number is equal to or smaller than the previous number).
'''
token = []
if rising:
current = 0
else:
current = 9
for digit in range(n):
next = randint(0, 9)
if rising:
while next < current:
next = randint(0, 9)
else:
while next > current:
next = randint(0, 9)
token.append(next)
current = next
return token
I ran this 1000 times and I noticed the least significant digits of each token tend to group up around 0 if the token is falling or 9 if the token is rising. e.g. 199999 459999 999999 100000 320000 440000 I think this is due to the fact that the range of possible digits is randomly constricted in one direction on each iteration. If there were some way to make a weighted choice in which randint
is more likely to pick a value closer to current
we would have a larger variety of rising/falling tokens.
I noticed that based on Chalmer's definitions of rising and falling numbers, 111111 could be generated by a makeRisingToken
function or a makeFallingToken
function. I just now noticed that it could also be generated by either of the palindromic token constructors. Maybe the definition should be changed? I'm not sure if that's supposed to be part of the puzzle or not. Here's Chalmer's definition:
rising numbers (each subsequent number is equal to or larger than the previous number)
falling numbers (each subsequent number is equal to or smaller than the previous number)
We could add a sixth category called "Super Number" which has all the properties of all the other categories put together.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.