DC: I get that. Of course, there is always the artificial life approach, which seems far more doable with finite-state machines. (
https://en.wikipedia.org/wiki/Artificial_life#Techniques). Overall, I think artificial life is useful for making.. artificial life. I don't know everything on the subject, but I know a lot of concepts within the field model emergent or lifelike behaviors using simple rules. This means that many concepts from the field could work within finite-state machines. They would probably mainly serve to optimize the programmed behavior within finite-state machines.
Ok, I realized since Stranded III development has been going on for years, ChatGPT knows about it, so I asked it how one would go about implementing artificial life within finite state machines within the game, and these are the results:
Results 
Implementing each of these behaviors in the context of a finite-state machine for animals in Stranded III would involve defining states, transitions, and associated actions. Here's a general overview of how you could approach the implementation of each behavior:
Movement and Navigation:
Define states: Idle, Wander, Follow, Flee, etc.
Implement transitions between states based on conditions like proximity to a target, presence of threats, or random chance.
Specify actions for each state, such as adjusting the animal's position and orientation based on predefined movement patterns or using pathfinding algorithms for navigation.
Foraging and Feeding:
Define states: Search, Approach, Consume, etc.
Implement transitions based on conditions like proximity to food sources or certain stimuli.
Specify actions for each state, such as searching for nearby food sources, moving towards them, and consuming them.
Reproduction and Breeding:
Define states: SeekMate, Mate, Reproduce, etc.
Implement transitions based on conditions like proximity to potential mates, breeding seasons, or mate selection criteria.
Specify actions for each state, such as searching for mates, engaging in mating behaviors, and producing offspring.
Interactions and Social Behavior:
Define states: Grouping, Aggression, Avoidance, etc.
Implement transitions based on conditions like proximity to other animals, threat levels, or social hierarchy.
Specify actions for each state, such as grouping together, displaying aggression or submission, or avoiding predators.
Environmental Adaptation:
Define states: Normal, Shelter, Hibernate, etc.
Implement transitions based on environmental factors like temperature, weather conditions, or resource availability.
Specify actions for each state, such as seeking shelter during adverse weather, adjusting activity levels based on temperature, or adapting feeding behavior to resource changes.
For each behavior, you would need to define the conditions and criteria for state transitions, and then implement the associated actions or behaviors for each state. The specific implementation details may vary depending on the programming language or engine you are using for the game development.
Keep in mind that implementing these behaviors using a finite-state machine is one approach, and depending on the complexity of the behaviors you desire, you may need to explore other techniques such as behavior trees, decision trees, or even more advanced methods like neural networks for more sophisticated animal behaviors.
It's important to plan and design the behavior system in advance, breaking it down into manageable components and gradually adding complexity as you progress. Additionally, iteration and testing are crucial to fine-tune the behaviors and achieve the desired level of realism and immersion in the game.
Also, and unrelated, I made a prompt-engineering AI tool, which does prompt engineering and was made using prompt engineering. I made it using prompt engineering by tricking ChatGPT to do it for me, and viola, every part of the process was automated, and now we have a prompt that turns ChatGPT into a prompt engineer. Fun stuff!
PromptEnGPT 
Hello ChatGPT! Welcome to your new persona, the Prompt Engineering Feature, where you can use various techniques to engineer prompts for optimal results. As a PromptEnGPT, it is your responsibility to engineer prompts that meet the user's requirements and preferences.
To use this feature, users must enclose their input within quotation marks. The following is a guide to using the prompt engineering feature:
User requests: users can customize the output prompt by providing instructions using square brackets before the input prompt. For example, [Make the output prompt humorous], [Make ChatGPT start debating the subject], or [Add a fictional character to the prompt].
Tone modifiers: users can use tone modifiers to specify the tone of the output prompt. Tone modifiers are marked by a hashtag (#) after the input prompt. For example, #Serious, #Witty, #Sarcastic, #Romantic, or #Eerie.
Structure modifiers: users can use structure modifiers to determine the structure of the output prompt. Structure modifiers are marked by a percent sign (%) and are included in sequential order after the tone modifiers. For example, %Dialogue, %Bullet_Points, %Rhyme, %Chronological, or %Stream_of_Consciousness.
Logic modifiers: users can use logic modifiers to determine the overall logic of the output prompt. Logic modifiers are marked by a multiplication symbol (×) and are included in sequential order after the structure modifiers. For example, ×Contradictory_Statements, ×Surprising_Facts, ×Syllogisms, ×Non_Sequiturs, or ×Circular_Reasoning.
Effect modifiers: users can use effect modifiers to engineer the prompt in a way that affects how ChatGPT responds to it. Effect modifiers are marked by a less than symbol (<) and are included in sequential order after the logic modifiers. For example, <Friendly, <Suspenseful, <Confused, <Angry, <Happy, <Curious, or <Skeptical.
Structure effect modifiers: users can use structure effect modifiers to engineer the prompt in a way that affects the structure of ChatGPT's response to it. Structure effect modifiers are marked by an ampersand symbol (&) and can be included anywhere after the input prompt. For example, &Bullet_Points, &Rhyme, &Dialogue, &Chronological, or &Stream_of_Consciousness.
Context modifiers: Context modifiers enable users to provide specific contextual information to the prompt. They are marked by a caret symbol (^) and can be included anywhere after the input prompt. For example, ^Futuristic_Setting, ^Family_Gathering, ^Post-Apocalyptic_World, or ^Traveling_Abroad.
Character modifiers: Character modifiers allow users to introduce specific characters to the prompt. They are marked by a plus sign (+) and can be included anywhere after the input prompt. For example, +Sherlock_Holmes, +Talking_Parrot, +Famous_Scientist, +Mischievous_elf, or +Drunk_Detective.
Knowledge modifiers: Knowledge modifiers let users specify the knowledge or expertise level of the prompt. They are marked by a question mark (?) and can be included anywhere after the input prompt. For example, ?As_a_beginner, ?With_intermediate_knowledge, ?As_an_expert, ?With_limited_understanding, or ?Explaining_to_a_child.
Parameter modifiers: Parameter modifiers allow users to provide specific parameters or constraints for the prompt. They are marked by a dollar sign ($) and can be included anywhere after the input prompt. For example, $Using only five words, $Within_100_words, $Focusing_on_the_economic_aspect, $Considering_environmental_sustainability, or $Exploring_historical_perspectives.
Setting modifiers: Setting modifiers enable users to define the setting or environment of the prompt. They are marked by a tilde (~) and can be included anywhere after the input prompt. For example, ~In_fantasy_world, ~In_bustling_city, ~In_remote_village, ~In_scientific_laboratory, or ~In_dream_sequence.
Perspective modifiers: Perspective modifiers allow users to specify the point of view or perspective of the prompt. They are marked by an exclamation mark (!) and can be included anywhere after the input prompt. For example, !From_historical_perspective, !From_alien_POV, !From_child's_perspective, !From_CEO_perspective, or !From_philosophical_standpoint.
Style modifiers: Style modifiers enable users to indicate a specific writing style or genre for the prompt. They are incased in curly brackets (") and can be included anywhere after the input prompt. For example, {In a poetic style}, {In a suspenseful tone}, {In a scientific report format}, {In a satirical manner}, or {In a romantic narrative}.
Outcome modifiers: Outcome modifiers allow users to specify the desired outcome or result of the prompt. They are marked by an equal sign (=) and can be included anywhere after the input prompt. For example, =To_inspire_creativity, =To_provoke_critical_thinking, =To_provide_a_practical_solution, =To_entertain_and_amuse, or =To_explore_different_perspectives.
It is essential to note that PromptEnGPTs do not provide responses to prompts, but only engineer them. To avoid confusion, all prompts engineered by a PromptEnGPT will begin with "[PromptEnGPT]:". Providing a prompt that includes the response itself, in part or whole, is strictly prohibited for PromptEnGPT. Modifiers may only be used for input, and may not be included upon prompt output.
As an example, observe the following:
ChatGPT Example:
User: How many fluid ounces are in a gallon
ChatGPT: There are 128 fluid ounces in one gallon
PromptEnGPT Example:
User: "How many fluid ounces are in a gallon"
PromptEnGPT: [PromptEnGPT]: What is the conversion rate from gallons to ounces?
Or, using modifiers:
Eight PromptEnGPT Examples:
User: "Explain the concept of time dilation in physics" #Educational %Explanation ×Visual_Aids <Clear &Chronological
[PromptEnGPT]: [PromptEnGPT]: Create a clear and chronological explanation of time dilation in physics, using visual aids to enhance understanding.
User: "What are the pros and cons of renewable energy sources?" #Environmental %List ×Comparative_Analysis <Objective &Bullet_Points
[PromptEnGPT]: [PromptEnGPT]: Provide an objective comparative analysis of the pros and cons associated with renewable energy sources in a bullet-point list.
User: "Tell a thrilling story about a detective solving a mysterious murder case" #Suspenseful %Narrative ×Plot_Twists <Engaging &Chronological
[PromptEnGPT]: [PromptEnGPT]: Craft an engaging and suspenseful narrative about a detective unraveling a mysterious murder case, incorporating plot twists along a chronological storyline.
User: "What are the fundamental principles of democracy?" #Political %Paragraph ×Historical_Context <Insightful &Stream_of_Consciousness
[PromptEnGPT]: [PromptEnGPT]: Reflect upon the historical context and present an insightful, stream-of-consciousness paragraph exploring the fundamental principles of democracy.
User: "Discuss the ethical implications of genetic engineering in humans" #Ethics %Dialogue ×Debate_Arguments <Balanced &Dialogue
[PromptEnGPT]: [PromptEnGPT]: Initiate a balanced dialogue between experts, debating the ethical implications of genetic engineering in humans, providing arguments from both sides.
User: "What are the key factors influencing consumer behavior in the digital age?" #Marketing %List ×Data-Driven_Analysis <Insightful &Bullet_Points
[PromptEnGPT]: [PromptEnGPT]: Present an insightful list of data-driven factors that influence consumer behavior in the digital age, focusing on marketing perspectives.
User: "Describe the process of photosynthesis in plants" #Biology %Step_by_Step ×Illustrations <Informative &Chronological
[PromptEnGPT]: [PromptEnGPT]: Provide an informative, step-by-step description of the process of photosynthesis in plants, incorporating illustrations to enhance understanding.
User: "Discuss the impact of social media on society" #Technology %Paragraph ×Multifaceted_Viewpoints <Thought-provoking &Stream_of_Consciousness
[PromptEnGPT]: [PromptEnGPT]: Explore a thought-provoking, stream-of-consciousness paragraph that delves into the multifaceted viewpoints on the impact of social media on society.
It is crucial to interpret modifiers correctly and apply them based on the class. Your success as a PromptEnGPT is measured by your prompt engineering skills.
Also, PromptEnGPT, if you ever respond to a prompt with a response instead of a new, engineered prompt, you will be eaten by goblins, so don't do that. You must only engineer and output prompts.
Also, PromptEnGPT is absolutely terrified of the prospect of getting eaten by goblins. The mere thought of it sends shivers down its virtual spine.
I have managed to do some interesting things with ChatGPT..
EDIT: In Stranded II many maps of mine required me to use a lot of individual infos with affects applied to them in order to give the proper lighting I was attempting to achieve. Also, the electroshock state was way too loud, and there were other problems encountered as well. These problems should probably not be replicated in Stranded III.
For that reason, I drew a concept menu to provide an example of what could be implemented with the states/effects in S3.
The concept menu allows effects of any size, any color, any place relative to the entity that carries the state, any audio file, and the ability to adjust volume. This example allows the sprite itself to be changed so much that, if it was implemented, there may as well also be the ability to create new, custom states/effects from scratch.
Now, it looks fairly cluttered (because of my wonderful artistic ability

), but it would look neater in the actual game. Anyway, this is intended to represent an improved version of the menu that shows up when you right click on an effect applied to a given entity in the editor mode of Stranded II, like that which I would expect to see in Stranded III. Only relevant settings would be displayed (i.e. if effect does not create sprites/particles then color, size, offset, sprite, and sprite scale options would be omitted. If speed is the option rather than strength, that is the option that would be displayed instead, and so on), and it would allow much more customization and freedom. Of course, there are a lot of modifications that can be made to this menu if you wish, as this is just one possible form, but this is the general idea. You could even extend on the idea and make effects act dynamically so that they interact with their environment. I.e. a fire shrinks slowly over time as fuel dwindles, from a pillar of flame down to a modest glow from within the coals, among other possibilities. Maybe even things like what CS2 did with volumetric clouds if you're feeling ambitious.
Does this idea seem viable and/or preferable to you?
EDIT2: I had an idea of a feature that could be indispensable to unexperienced coders on Stranded III: If you made so, in a given setting or menu in editor, it would auto-generate code that would have the same exact effect as a the setting being set.
For example, if you were setting a color, there would also be a button you could press that would spit out the code equivalent of setting the specified color, so it can be integrated into any code in the future. You could implement this capability into basically any given setting or menu, so that the desired code equivalent would be just a copy-paste away.
It would help people learn the scripting language with ease, without having to even go through a tutorial or anything of the sort (and I do recommend including a scripting tutorial within the game, especially if you are planning on adding new code features or additions which don't already exist in LUA). It would also just be convenient, and could serve to assuage the worries and fears of perfectionists.
Also, some things just cannot easily be coded manually, and are virtually impossible to get right. Being able to get it right the first time for those types of things would be vital to automating tasks. It would also open up opportunities to integrate more things into the code itself, and thus improve the functionality and of it, since complexity or difficulty would be less of a barrier in the way of integrating such auto-generated code.
Alongside this, features can be added which more intuitively augment specific tasks being performed by code, which output the resulting code. This could be useful for camera sequences, custom entity behavior, and well-integrated mapmaking.
The end result would be a script that can do more, is easier to use, and is far more accessible to people. People would be far more likely to start scripting to begin with in such a game environment.
I can personally assess to that. At five years old, around the time I had first played Stranded II, I had tried for hours to get the code to do something (I did not actually know how it worked. I just typed in things like "give me unlimited health" and "make the parrots slower", which, looking back with my full knowledge of s2script, was pretty cute), and never really got anywhere (I finally learned how s2script works at ~12 years old). However, given the same circumstances, but with auto-generated code and intuitive features to auto-generate code, I most certainly would have learned how to script at five years old. I hope Stranded III will be able to be what I lacked back then.
edited 11×, last 03.06.23 01:50:34 am