propeller.problems.PSB2.twitter
=========== PROBLEM DESCRIPTION =============================
TWITTER from PSB2
Given a string representing a tweet, validate whether the tweet
meets Twitter’s original character requirements. If the tweet
has more than 140 characters, return the string "Too many characters".
If the tweet is empty, return the string "You didn’t type anything".
Otherwise, return "Your tweet has X characters", where
the X is the number of characters in the tweet.
Source: https://arxiv.org/pdf/2106.06086.pdf
===============================================================
-main
(-main & args)
Runs propel-gp, giving it a map of arguments.
error-function
(error-function argmap data individual)
Finds the behaviors and errors of an individual: Error is 0 if the value and
the program's selected behavior match, or 1 if they differ, or 1000000 if no
behavior is produced. The behavior is here defined as the final top item on
the STRING stack.
instructions
stack-specific instructions, input instructions, close, and constants
random-int
(random-int)
Random integer between -100 and 100