Open
Conversation
Feature/profiling and refactoring
view refactoring (full sfml support)
speed control ui
Multithreading fix and refactoring
save system v1 is finaly done
binary saves and autosave checkbox
StopAtStart and StopAtEnd buttons
restart on end button
Save simulation
right panel refactoring
info button
survival criteria info button
add comments to functions
Owner
|
@ilyabrilev, this is awesome. Very nice improvements. I'm going to decline pulling your work into this repo only because I'm trying to transition it into maintenance-only mode. Instead, I've added a shout-out and a link to your fork in the README.md file (if you'd like that reference worded any differently, let me know). Thanks for your impressive work on this. |
Author
|
That is ideal, thank you very much! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi, @davidrmiller. Thank you for this awesome repository. I've created a fork that might be worth checking out. To get the glimpse on how it looks like, you can check screenshot.png in the root directory.
The main idea is to render simulation in real time rather than in the form of video files. With real time render simulation feels more alive, debugging is easier, and it opens whole lot more possibilities to observe and interact with the simulation. I've also tried to preserve existing functionality, so my PR has no innovative ideas, it's almost pure cosmetic that can be turned of.
Here is a brief list of changes:
But first I've done some refactoring to prevent codebase from bloating because of the amount of additional files and to make it more suitable to the new flow.
simulatorfunction) is used for top-level initialization and main application loop. Main simulation loop was extracted into newsimulatefunction.useriois grouping together everything related to input and output. ClassUserIOis an entry point. It is called at specific points of simulation life cycle and passes it toSFMLUserIOand/orImageWriterdepending on which were enabled at the construction ofUserIO.ImageWriterhas not undergone any changes.SFMLUserIOis the main class for real life render. Display loop and event handling are done in this class. It also includes main window, view, all custom display components and child windows. All custom components are stored insfmlComponentsdirectory and created bySFMLUserIOwith a heavy use of callback functions. Responsibility of custom components is to display UI, hey don't usually interact with simulation logic directly.survivalCriteriadirectory is where all challenges logic placed. It containsSurvivalCriteriaManager- a class that other parts of application are interacting with, andSurvivalCriteriasuccessor classes that handles if certain indiv passes a criteria as well as displaying the criteria. The idea behind splitting criterias into dedicated classes was to make creating/disabling/enabling new challenges as easy as possible.aidirectory contains everything related to genomes, indivs, signals, etc. No major changes hereutilscontains logic that not directly related to simulation, like: analysis, profiling tool, random number generator, and save/load system. save/load system uses cereal library which under the hood callsserializefunction added forParams,PeepsandIndiv. Cereal library is located insideincludelibrary.Outputdirectory. This includes:Application was tested on Linux Mint 21.3
New requirements are:
My solution is far from being perfect. UI needs more polishing, there are not enough space for all settings and buttons. Performance was not a first priority, so there is probably a lot that can be done on that front. Building inside a docker container also stopped working, I assume because it doesn't support SFML.