Forgot Password?
Advanced Search
Join our Discord Follow our Facebook page Follow our Instagram page View Official Sylestia Merchandise
Active Players on Sylestia
Category Total Yesterday
Players 1,487 272
Sylestia Pet Data
Category Total Yesterday
Pets 9,095,065 1,683
Generated 741,284 34
Captured 1,278,926 76
Bred 7,074,707 1,573
Statistics updated daily at midnight
Join Today!
Forum Index > Suggestion Box > Label for PB
Page 1 1, 2 Go to Page:
Author Thread Post
Kujou
Level 65
The Kind-Hearted
Joined: 5/23/2017
Threads: 39
Posts: 1,419
Posted: 5/16/2018 at 7:51 PM Post #1
A ton of the time when I'm just looking through pets on sale in the advanced search I find one that looks like a pb, and I waste like an hour trying to check all its ancestors. Is there any way that there could be a label on them, kind of like a themed one? Or a specific search bar for them in the advanced search?
Just a thought.
Typhix
Level 61
The Artistic
Joined: 7/21/2015
Threads: 73
Posts: 2,749
Posted: 5/21/2018 at 7:45 PM Post #2
This would be nice! It would decrease the arguments about if the pet is actually pb or not and as you said would make things shorter in the advanced search
Theafy
Level 75
Snow Wars Champion
Joined: 9/23/2016
Threads: 58
Posts: 1,446
Posted: 6/13/2018 at 1:33 AM Post #3
I do support this however am also aware that this has been brought up in the past and was concluded virtually impossible.
Let's say 3-6 generation pets aren't that hard, but when it comes to 20-30 generations purebred then there would be SO many ancestors to look for just ONE pet. To find all themed purebreds and labeling them would take a crap ton of time and effort even if a script was made and ran to find these pets. There are already over four million pets in existence...increasing as we type.

However, I was trying to buy a restricted purebred, however when I checked its bloodline there was one pet, maybe it's great-grandparent or further. Since it was bred by purebreds after the messed up line there the pet I was going to buy looked no different than a purebred. This was a problem for me lol.
Jdavidc
Level 70
Vanquisher of Undead
Joined: 2/19/2018
Threads: 43
Posts: 251
Posted: 6/13/2018 at 9:48 AM Post #4
I could probably think of an algorithm to do this, given time, but it'd probably need to be executed during a maintenance, as it would be anything but straightforward.

<Computer Programmer stuff>
First, you'd need to get a list of all tagged theme pets, and their theme (which I imagine would be 2 unique database IDs per tagged themed pet, one for the pet ID we can see, and another for what theme the pet belongs to).

Next, you'd need to go through alllllllllllllllll the children of those pets (and themed pets would see a lot of action when it comes to breeding), and search for children that have the same tagged themed parents. Next, tag *these* children as purebred themed of the specific theme type (which may necessitate a new database field for purebred/tagged, along with the theme being added). This would be time consuming, and the worst part is, this needs to be done repeatedly in a loop many times! (See below)

Now what do you do? You repeat this process, only this time, you consider all purebred/tagged of the same theme instead of simply tagged to generate more purebred children in the database, and then you repeat this process again, and again, and again...

How do you know when to stop? You need to record whether any changes were made during any iteration. Once you run out of changes, you've finally finished marking all purebred themed pets as purebred along with their associated themes.

From here on, any time a new pet is bred, it should be easy to mark it as purebred if the parents (tagged/purebred) have the same theme.
</Computer Programmer stuff>

I *think* it can be done if the above steps were put into a script, but it'd definitely need to be done during a maintenance.

EDIT - I think the algorithm could be simplified a bit if you only search for one gender for the parents, because you still have to check a parent of the opposite gender for each child anyway.

EDIT 2 - I thought about this a bit more. Instead of searching for themed parents and going through their children, simply search through all 'offspring' pets and tag any with a matching themed pair of parents as a purebred of the same theme. The process gets repeated over and over, as before.
Edited By Jdavidc on 6/13/2018 at 10:09 AM.
Krinadon
Level 75
Shadow of the Moon
Site Administrator
Joined: 12/17/2012
Threads: 1,242
Posts: 15,407
Posted: 6/13/2018 at 10:18 AM Post #5
Yea. It's basically what we do for the Inbreeding calculation. The issue is you end up with sooooooooo much data that you literally run out of memory or the process takes literally minutes and minutes to calculate just for a single pet.

It's why Inbreed Percentage can only go back ~12 generations or whatever the final number was.

However, with Purebred, you have to go ALL the way back to verify. Literally, for those 30+ generation pets, tens of thousands of pets all at once being stored in memory and all of their parents/siblings/etc/blah blah.

I did start a separate database table a couple of months ago to track just specific children so the data is a lot more condensed at this point. At some point I planned on playing with that data and seeing if I can write something up that'd work in a realistic time frame.
Mikazukichan
Level 75
The Artistic
Joined: 1/28/2014
Threads: 313
Posts: 9,544
Posted: 6/13/2018 at 11:41 AM Post #6
So... my database knowledge isn't all that great, but reading what David was saying, I'm thinking that, once the initial tagging was done, there would be no need to go back through 30+ generations to check for purebred status to do tagging? If, as David suggested, the pet IDs that are affected were given a secondary ID, like the current tagged pets, then the script could check the two creating parents every time instead of looking for the initial tag. For example, two currently tagged Asiatic Lily Qitaris are bred together. The script looks and sees that they both have the same tag with the same name. Because this is so, the resulting offspring is given the Asiatic Lily Qitari purebred tag. When two offspring with the Asiatic Lily Qitari purebred tag are bred, the script looks and sees that the parents both have the Asiatic Lily Qitari purebred tag and also give their offspring the same purebred tag. The script would have to be written in such a way that the original tag and the purebred tag for each theme were recognized as being the same theme, but once that is done, and tags created for each theme's offspring, the script would be autonomous and would check only the parent generation for purebred confirmation. Yes, this would take forever initially, because the script would have to run cyclically, as David said, to grab all the current purebreds, but if it works, it shouldn't be too bad afterwards, I think? Not sure this reads easily, so a visual representation of how I imagine the script might work:

script asks: if 'mother' and 'father' = tagged or purebred tagged, then offspring = purebred tagged, if not then no tag

This would result in the script going through each offspring and looking at their parents. Initially it would only pick up offspring of tagged sylesties, because there are no purebred tagged yet. The script would find these initial purebred and tag them. Then it would run again, now picking up these second generation themed's offspring, either with other second generations or tagged, and tagging them. This script runs again and again until there are no more new offspring being tagged, signaling that all purebreds are accounted for. Then, this script would run for each new egg created, looking only at the parents and whether they are original tagged or purebred tagged. Only if they have these indicators would the offspring get the tag. The other generations don't matter at all, since they were accounted for when deciding whether each subsequent generation got their tags.

So, when running the script initially, it would look like this:

tagged+tagged; tagged+tagged; tagged+tagged
offspring + offspring; offspring + tagged
offspring + offspring
offspring + tagged
offspring


After the first run:

tagged+tagged; tagged+tagged; tagged+tagged
pb tagged + pb tagged; pb tagged + tagged
offspring + offspring
offspring + tagged
offspring


After the second run:

tagged+tagged; tagged+tagged; tagged+tagged
pb tagged + pb tagged; pb tagged + tagged
pb tagged + pb tagged
offspring + tagged
offspring


And running until we got to:

tagged+tagged; tagged+tagged; tagged+tagged
pb tagged + pb tagged; pb tagged + tagged
pb tagged + pb tagged
pb tagged + tagged
pb tagged



However if there was a non-tagged somewhere in there, it would look more like this:

before script runs:
tagged+tagged; tagged+tagged; tagged+tagged
offspring + offspring; offspring + pb-looking offspring
offspring + offspring
offspring + tagged
offspring


after script runs:
tagged+tagged; tagged+tagged; tagged+tagged
pb tagged + pb tagged; pb tagged + pb-looking offspring
pb tagged + non-tagged offspring
non-tagged offspring + tagged
non-tagged offspring


Even if it looks like a purebred, because the script noticed back in the second generation that there was a non-tagged parent, the resulting offspring did no receive a tag, and therefore every generation afterwards, the script came back with parents not having two tags, so no tag for the offspring.

Not sure if my understanding of how this could be run is correct, but if it could look only at the parent generation like this, I think it might be feasible? (though the initial runs of the script would likely take a rather long time >>)
Edited By Mikazukichan on 6/13/2018 at 11:44 AM.
Katelynn4545
Level 71
The Artistic
Joined: 5/24/2015
Threads: 350
Posts: 17,634
Posted: 6/13/2018 at 3:09 PM Post #7
This is a tedious task and the solutions are not that easy, but Im curious if ( like with the themes ) they could have an Icon like the star but in a different color of two tagged pets were breed together? Granted you would not know if it was mixed or pure themed but it would be something just curious if that may be an eisier option

Or if maybe something on its own that players can Acsses or use scales to see if a single pet is purebred or and give it a purebred tag then it does not have to be every pey
Edited By Katelynn4545 on 6/13/2018 at 3:12 PM.
Jdavidc
Level 70
Vanquisher of Undead
Joined: 2/19/2018
Threads: 43
Posts: 251
Posted: 6/13/2018 at 9:33 PM Post #8
My approach is to go the other way, rather than searching through all of the ancestors of the children bottom up, you start with all tagged pets and work top down.

So you start with tagged themed pets of one gender that can be searched for and grabbed easily enough and you could put all their pet IDs and theme IDs into a table for running a horrible query. Offspring actually won't work here because they'd be generation 1 with no parents.

Then you go through each pet grabbed, and start going through all the children one-by-one (only list of children in memory at a time), and then for each child, simply check if the parent of the other gender is a pets that have been marked as a themed pet with the same theme name/id (whether tagged or purebred). If so, the child gets marked as a purebred themed pet with the appropriate theme name/id.

At this point you have some tagged purebred children, but you need to keep checking by doing this over again to find some more purebred children (it can get a little complicated if a pet has an uneven family tree of ancestors, which is why I can't make this simpler). This time, you do the same thing, but unfortunately you now have more pets to consider each time. Sadly I don't see a way of ignoring pets from the first generation in subsequent iterations due to uneven family trees.

You may need to set up a temporary database table that stores pet IDs of pets of one gender that are themed and not offspring (tagged), as well as offspring (purebred), and it gets more populated with each iteration of the loop that checks for PB direct offspring. This is to prevent memory issues that would make the server explode.
Krinadon
Level 75
Shadow of the Moon
Site Administrator
Joined: 12/17/2012
Threads: 1,242
Posts: 15,407
Posted: 6/14/2018 at 5:49 AM Post #9
Link: https://www.sylestia.com/forums/?thread=61318&page=1#8
Author: Jdavidc
Time Posted: 6/13/2018 at 9:33 PM
My approach is to go the other way, rather than searching through all of the ancestors of the children bottom up, you start with all tagged pets and work top down.

So you start with tagged themed pets of one gender that can be searched for and grabbed easily enough and you could put all their pet IDs and theme IDs into a table for running a horrible query. Offspring actually won't work here because they'd be generation 1 with no parents.

Then you go through each pet grabbed, and start going through all the children one-by-one (only list of children in memory at a time), and then for each child, simply check if the parent of the other gender is a pets that have been marked as a themed pet with the same theme name/id (whether tagged or purebred). If so, the child gets marked as a purebred themed pet with the appropriate theme name/id.

At this point you have some tagged purebred children, but you need to keep checking by doing this over again to find some more purebred children (it can get a little complicated if a pet has an uneven family tree of ancestors, which is why I can't make this simpler). This time, you do the same thing, but unfortunately you now have more pets to consider each time. Sadly I don't see a way of ignoring pets from the first generation in subsequent iterations due to uneven family trees.

You may need to set up a temporary database table that stores pet IDs of pets of one gender that are themed and not offspring (tagged), as well as offspring (purebred), and it gets more populated with each iteration of the loop that checks for PB direct offspring. This is to prevent memory issues that would make the server explode.


Yep. That's basically the idea of the new table I created awhile back. I haven't checked it really since then, but assuming it's working properly, it should have all pets (all 4+ million) in there with their mother and father as individual entries. So I'd be able to do a quick look up for any of the 4 million pets to see who their mother or father is.

Atm, that's all that's in there. But it'd be easy to add a new column for Themed ID # and throw that in there.

And then, yep, the idea would be to do what you described - going through each pet one a time and having a separate place somewhere to tag whether it's a purebred or not - or whatever other information I wanted to track.
Edited By Krinadon on 6/14/2018 at 5:49 AM.
Amaya
Level 75
The Kind-Hearted
Joined: 12/18/2012
Threads: 67
Posts: 1,039
Posted: 7/10/2018 at 9:46 PM Post #10
I would really like this, when you get the chance. If it works in generation sweeps like above but every sweep would take to long I could see the possibility of running the check once each maintenance until you think the load is small enough to be running consistently.

ie. First maintenance sweep through all pets checking for"Themed + Themed"
Second maintenance sweep through all pets once for "Themed+PB" or "PB+PB"
Third maintenance run the sweep just once.

Basically spread out the load, I think for this feature we wouldn't mind a slow steady implementation at first.

However I don't know how much server load such a script would take, maybe it doesn't take that much and its more the implementation that takes time. But its nice to know the solution may be simple to implement when you have the time.


I think I wouldn't even mind it running a species at a time, or even a theme at a time (though probably not a theme a week, maybe a sweep for each theme every day). If server load is a problem then I really think we'd all be happy with a slower solution should it be needed.
Edited By Amaya on 7/10/2018 at 9:50 PM.
Go to Page:
1, 2
This Page loaded in 0.013 seconds.
Terms of Service | Privacy Policy | Contact Us | Credits | Job Opportunities
Join our Discord Follow our Facebook page Follow our Instagram page Visit Official Merchandise Shop
© Copyright 2011-2026 Sylestia Games LLC.
All names and logos associated with Sylestia are Trademarks of Sylestia Games LLC.
All other trademarks are the property of their respective owners.
For questions, comments, or concerns please email at Support@Sylestia.com.