What library/repo is this for?
Iām not sure. Iām just getting started with your instructions earlier in this discussion thread. I clicked on the github link you suggested and github said to install Python 2.7.12.
Iāve done a fair amount of programming, but, these shared web resources are totally new to me.
Iām not sure my reply went specifically to you, so I am quoting it to you. Iām not used to forum threads either.
Iām not sure. Iām just getting started with your instructions earlier in this discussion thread. I clicked on the github link you suggested and github said to install Python 2.7.12.
Iāve done a fair amount of programming, but, these shared web resources are totally new to me.
Iām not sure which GitHub link you mean. EternaJS or Arnie? I donāt see any information about Python 2 in either README
Oh, I assume youāre referring to Emscripten. Did a bit of digging and it looks like Python >= 3.5 also works. For what its worth though, if youāre just running the models locally, you may not want to use Emscripten, but instead just compile them ānormallyā - or use Arnie. Eternaās implementations of the libraries arenāt really built well for external usage. You can certainly try though if you want.
I see that GitHub has some tutorials. Iām going to run through some of those, so I at least get some vocabulary. I think this will be more efficient for both of us than if I just start sending you questions at every sentence I read.
In the SDD I placed on my google drive (if you havenāt read it, itās a very short (!!) SDD at this point), I called for a new program called āEternagame_mod_oneā. I now think that it is entirely unnecessary. Somewhere in your source code, you must associate each puzzle with the locked bases for that puzzle. Similarly (but, perhaps more complicatedly), there must be information showing which pairs of bases are bound in the target structure. If I could just get access to those two pieces of information, I could place them directly into my Prolog program. I could then run rnafold.pl on any specific puzzle, just by entering its identifier. This would be a huge help. I clicked on your link to āhere are the sourcesā. It took me to a discussions thread on ābuilding the folding engines.ā Since Iām still trying to figure out GitHub, I didnāt know where to go from there, to find individual files and look for the information that I need. Can you help me find the information?
If youāre just looking for puzzle definitions, you can use our web API. Specifically, youāre looking for https://eternagame.org/home/swagger/index.html#/puzzle/get_get__type_puzzle
I still need some clarification on what you want as far as validating your designs in order to point you in the right direction there.
- If youāre looking to verify that it passes all constraints within Eterna, Iāll point you in the direction of writing a booster where you can paste in your potential solutions and verify them in-game.
- If you want to be able to do it outside of the Eterna interface within your prolog program directly, Iād probably recommend Arnie as a relatively clean interface to the different folding engines.
- To be honest, working with the EternaJS codebase directly is probably not what you want - unless you want BOTH full game validation and usage directly from your prolog script - but thatād potentially require more work, essentially loading up an instance of the game you can run headless. This is something I would like to eventually improve on (creating some core libraries that could be used somewhat similar to Arnie), but weāre not there yet.
I tried the link you supplied, but the responses I get look like this:
ādataā: {
āpuzzlesā: [
{
āidā: ā6502963ā,
ātitleā: ā[Thermocycler] Level 1 of 11ā,
ācreatedā: ā1360881926ā,
āusernameā: ācalebgeniesseā,
āuserpictureā: āsites/default/files/pictures/picture-130245.jpgā,
āmade-by-playerā: ā0ā,
ānum-clearedā: ā9198ā,
ātypeā: āProgressionā,
āsolved-by-botā: null,
ārewardā: ā500ā,
āmade-for-labā: null,
āfolderā: āViennaā,
ānumber_of_statesā: 1
},
There is a lot of information there about the puzzle, but nothing that I need. Again, I need to know what bases are locked (and what they are locked to) in the puzzle. I also need to know what bases are bound together in the target solution.
Of course, I could bring up the puzzle within the game, using the puzzle ID and then hand copy the values into my program. Thatās what I have done so far. I was hoping to be able to get a list of the data I need for all of the puzzles in a text version.
Iām deferring the validation portion for now. But consider this. My program will present hundreds to thousands of potential solutions. Iāll be trying to add more rules to cut this down, but too many will limit the ability to find all of the valid solutions. Entering all these solutions by hand, or even pasting them into a field for each solution is not really practical.
I see you are working on some things at that end. Perhaps by the time I need them they will exist.
Again, thanks for your help.
You donāt want type=puzzles, but type=puzzle. EG: https://eternagame.org/get/?type=puzzle&nid=6502963 The plural version is the listing (used for Eterna) and the other is for an individual puzzle (used for /puzzles/ and /game/puzzle//)
Entering all these solutions by hand, or even pasting them into a field for each solution is not really practical.
By pasting, I meant to suggest pasting many solutions at once, EG pasting a CSV into a textarea. You could imagine using a browser API to load a CSV or such from the filesystem too. Of course, the more streamlined approach would be to have it completely automated
I think weāre getting closer. Now, I get responses like this:
{
āidā: ā782913ā,
ātitleā: āProject : Turtle project Ml 6-6-6-6, 3 legs (3 NT), neck (3 NT) + tetraloopsā,
ācreatedā: ā1328186035ā,
āusernameā: āEli Fiskerā,
āuserpictureā: āsites/default/files/pictures/picture-8627.jpgā,
āmade-by-playerā: ā1ā,
ānum-clearedā: null,
ātypeā: āExperimentalā,
āsolved-by-botā: "ViennaRNA_CCACUAGAUGAUGAGAGUCCCAAAGGUCCCGCGACAAAUAUGCACUACUGCCAACGAUGG_426, RNASSD_GGGAGAGCCGCGUAGACGCUAAUGAGGGGACACCCAGAAAAGGCUGAUGCCAAAAUACCC_70, InfoRNA_GCCAACUUCGGGGAAACCCACGAUAGGGGAAACCCACGAUCGGGGAAACCCACCACCGGC_3, ",
ārewardā: null,
āmade-for-labā: null,
āfolderā: āViennaā,
ānumber_of_statesā: 1
}
Which do include some sequence listings. But they are solutions, not the lock sequence for the original puzzle.
And, yes being able to paste many solutions at once would be a big help, although I donāt know what āCSVā means. Looks like a lot of vocabulary has changed on me.
In the case where data.puzzle.locks
is null, there are no locks. If you load up a puzzle that has locks, theyāll be there (experimental puzzles with ātailsā at the start and end are special cases as those entire regions of the puzzle are added in the game itself when the puzzle is loaded, but you probably donāt care about those).
CSV is comma separated value - common plain text/flat file interchange format. Itās what you might export a spreadsheet to to be easy to interoperate between programs.
Possibly, I was not completely clear. At this stage, I am not looking for solutions to puzzles. I am looking for puzzle definitions.
Itās been a while since I checked in. I am still working . Right now Iām implementing multi-threading in the program. This is taking a while and Iām having lots of back and forth with the helpful forum at Swi-Prolog. It seems that the method they are recommending was just added to the language at the end of June.
Iām also doing some structural cleanup, before I totally lose track of what Iām doing.
Hereās a link to our API reference that you might find useful
Also, you might want to join our Discord
Best of luck with the cleanup!
Yes, I understand - the ?type=puzzle API endpoint is exactly what the game pulls from for its puzzle definitions (with some minor transformations done in the code to handle things like defaults)
I was mired in the morass of multithreading for some weeks, but have now broken free. There is a new version of rnafold on the google drive. It is rnafold20200824.pl. I have also made a .docx of it so it can be viewed without having to download the compiler, but you wonāt see the pretty colors the IDE uses to delineate the structure.
It now uses 98% of the CPU(s) . I had to rework the check_bond section, but, as a result it is much cleaner now.
I hope I can move on to more complex computations without having to wait too long for results. However, I may spend some more time on architecture first.
rnafold is now running in multithreaded mode. This has resulted in a 40% reduction in run time for the medium focus version of puzzle 11. I had hoped for a larger saving, however, it seems that the chip in my laptop is much stronger than the fan. When I run in multithread, the CPU is used at 100%, with 98% of that going to rnafold, and all 8 LPUs are also running constantly at 100% (it would be hard to be otherwise). However, the CPU speed decreases from 3.3 GHz to 2.2. This accounts for most of the missing speed. The rest is, presumably, due to the overhead imposed by the multithreading process itself.
I have been using puzzle 11 because it only takes about 4 minutes to run even in sequential mode.
I will be moving ahead into more complex puzzles, but at least now I know that I could make good use of more processor power if I had it.
I have placed a new document on my Google Drive (see top of thread). I hope that some of you will find time to read it (it is only 3 pages). It provides a better idea of what I am trying to do, and what the possibilities and limitations are. The document is āPuzzle 11, an exampleā and is in both docx and pdf formats.
I am hoping to get some feedback.
That code cleanup I mentioned turned into a complete teardown and rebuild. I think it was worth it. It was tempting to charge ahead into more puzzles, but the new approach will make things easier in the long run.
The google drive now has a directory called āsourcesā, and a sub-directory with todayās date, which has the new sources. The program is now modularized and has four source files. More importantly, the file āsetup.plā contains the a database of puzzle definitions. Now, I can just make entries there instead of writing new code for each puzzle. Of course, when I add a new rule, I will need to write code for that.
This version is fully multithreaded and runs all 4 cores (8 threads) at 100% loading.
Iām sure that for some of the developers, this looks like a pitifully small amount of code, but I think Prolog is a compact language.