Anime Families [tracked]

old granted and denied feature requests

Moderator: AniDB

Locked
egg
Posts: 769
Joined: Tue Nov 11, 2003 7:17 am

Anime Families [tracked]

Post by egg »

After trying to look through the relations graphs and trying to make sense out of them, I came up with an idea and would appreciate some input. Obviously since multiple animes are related, there are different groups of animes. Unfortunately sometimes the relations between different animes are minor and this leads to some cases where totally unrelated animes are in the same graph because they both have a [relatively weak] link to something in common. The most common abuse of this is with Clamp, the Card Captor Sakura animes have NOTHING to do with the X animes other than character relations to the XXXHOLiC and Tsubasa Chronicle. There are other examples as well, but this is the most extreme. Here is the current graph (reduced in size):
Image

My first thought as a way to deal with this, was to make it so ‘Other’ and ‘Character’ relations would not propagate when they were graphed. That means that if A has an 'other' relation to B and B has relations to C and D, if you looked at the graph of A it would only have A and B (and not the things related to B), but if you looked at the graph of B it would have A, B, C and D.

So, if I look at the Clamp example, if I looked at the graph for X then it would look like:
Image

And Tsubasa Chronicles then it would look like:
Image

In this case, each graph is still fairly large, but it is much more readable than before.

There are a few issues that I see with this approach.
1) How are the rules defined? Which relation types do not propagate, ‘other’ and ‘character’ are likely, but what about ‘same setting’? There may even be questions about ‘alternate version’ and ‘alternate setting’.

2) There are probably cases where a ‘character’ or ‘other’ relation should propagate. There are probably cases where ‘other’ was chosen as a link because they didn’t know what to put. A possible example from above would be X2 Double X, It’s graph would look like:
Image
Note that since it only had ‘other’ relations, nothing is propagated; Tokyo Babylon isn’t even listed, even though it is definitely related to X.

3) There are a lot more graphs that need to be created since any anime with ‘other’ or ‘character’ relations needs its own graph generated. [Note this might not be an issue with the new server, and the graphs would be smaller which would help bandwidth.]

After thinking about all of this, I came up with Anime Families, named groups of animes that are related. The idea behind this is when a relation is created between two animes, then the system will ask if the animes are in the same family and if there is not a family name, it will prompt them for the family name. All of the relations for any of the animes in the same family are shown, but relations outside of the family (regardless of the type) do not propagate. In this example I would put, X, X Movie, X2 Double X and Tokyo Babylon in the same family. That would mean that they would share the same graph; it would look X graph above, even if they chose the graph for X2 Double X. Also, the groups could help with the searches as well, for instance if you searched for X, then it could also show Tokyo Babylon because it is in the same family (other examples would be Lost Universe for Slayers or various Pikachu Specials for Pokemon).

There is also the possibility to make subgroups, to group parts of larger groups for organization. For instance this may be applicable for Gundam, but overall it may not be worth the effort for the few families that it would help.

Note the examples I pulled out were just for the sake of explanation and discussion. These relations may not be correct, please do not discuss the validity of these relations here, if they are wrong please discuss it in the DB Change Requests forum.
Elias
Posts: 242
Joined: Tue Feb 17, 2004 4:55 pm

Post by Elias »

Generally i agree, but with exception of such anime families. If you share one graph for each member of family, than: connections to outside of family will be lost OR we will end with graphs nearly same large and messed as some of them are now.

Creating different version of graphs when required (even for each member of anime family) may be better idea. It will not make much more work for server, there are not many such complicated cases like this examples and graphs will be usable egain.
Last edited by Elias on Wed Dec 07, 2005 10:28 pm, edited 2 times in total.
Elias
Posts: 242
Joined: Tue Feb 17, 2004 4:55 pm

Post by Elias »

Right now there are already searched groups of related animes with connections inside such group. It will not be a big problem to split those groups with some tricky way to made more than one subgraph is needed.
Lets try maybe like this (sorry for using some strange pseudocode):
Assuming we have already selected one group of connected animes in animes_table and all theyr relations in relations_table

Code: Select all

case
when (size(animes_table)<=4)
   -- no need to split such small graphs
  make 1 graph from animes_table and relations_table
when all relations in relations_table are 'strong' (sequel, prequel, side story, main story)
   -- no weak points in graph
  make 1 graph from animes_table and relations_table
otherwise
  var_counts=0
  variants= array of record {array of bool, array of bool}  
  variant_for_aid = array of int
  for i in size(animes_table)
    aid=animes_table[i]
    a1=array of boolean[size(animes_table)]={false,...}
    a2=array of boolean[size(relations_table)]={false,...}
    a1[i]=true -- add this anime to subversion of full graph
    call mark_weak(aib,true)
    -- maybe there is already the same variant for other aid?
    for x=1 to var_count
      if variants[x].a1 equals a1 and variants[x].a2 equals a2 then
        variant_for_aid[i]=x
        break
     end if
    end for
     if empty(variant_for_aid[i]) then
       -- new variant of graph required
       var_count++
       variants[var_count]={a1,a2}
       variant_for_aid[i]=var_count
     end if
  end for    
  for i=1 to var_count
    create graph using variants[i] (add to grapth only animes for which a1[aid]=true and relations for which a2[rel]=true)
   use that specific graph for animes, which have variant_for_aid[aid]=i
  end for


 proc mark_rel(aid,allow_weak)
    for j=1 to size(relations_table)
      if relations_table[j].left=aid then
        a2[j]=true -- add this relation to subversion of full graph
        aib=relations[j].right
        -- now serch for positions of aib in animes_table -> 
        k=position of aib in animes_table
        if (not ai[k]) then
           a1[k]=true
          if relations[j].type is strong then
          -- follow by strong relations to other titles
         call mark_weak(aib,false)
        end if
      end if
    end for
end proc
egg
Posts: 769
Joined: Tue Nov 11, 2003 7:17 am

Post by egg »

Elias wrote:Generally i agree, but with exception of such anime families. If you share one graph for each member of family, than: connections to outside of family will be lost OR we will end with graphs nearly same large and messed as some of them are now.
I disagree. For every relation in the database, there is probably some reason for it to be there. Currently with any type of relation, no matter how weak or inconsequntial, all of the animes that are related, no matter how distantly, are in the same graph.

With the families, the mods would have some control, and what are currently the largest graphs would probably be broken into a few families. Every family will show that it is linked to other things (and maybe those should have something signifying those have links that are not shown).

As far as your proposal... I think that this is more complicated and the results would be more chaotic (at least from a user's point of view). The families would give more control over what should be included in the graphs. This allows flexibility to handle the graphs whichever makes sense for that family.
kidan
Posts: 319
Joined: Thu Feb 13, 2003 9:13 pm
Location: .DE

Post by kidan »

I remember we had some discussion about these "weak links" sometime ago. (Maybee it took place in the tracker which is down atm)

I think the resolution was to have a flag (weak), which could be set on addition of a new relation. A "weak"-tagged relation would not join the corresponding graphs but show up as a link to the other graph.
Elias
Posts: 242
Joined: Tue Feb 17, 2004 4:55 pm

Post by Elias »

egg wrote:For every relation in the database, there is probably some reason for it to be there.
But sometimes the reason is very questionable (like Kaze no Yojimbo - Samurai 7 connection).
egg wrote:Currently with any type of relation, no matter how weak or inconsequntial, all of the animes that are related, no matter how distantly, are in the same graph.
This would be not a problem if graphs would be allways small, but some insane exceptions (like pointed in your post) need some corrections.
egg wrote:With the families, the mods would have some control, and what are currently the largest graphs would probably be broken into a few families. Every family will show that it is linked to other things (and maybe those should have something signifying those have links that are not shown).

As far as your proposal... I think that this is more complicated and the results would be more chaotic (at least from a user's point of view). The families would give more control over what should be included in the graphs. This allows flexibility to handle the graphs whichever makes sense for that family.
OK, maybe it would produce too many different graphs.
But, i didn't think that adding some 'family' field into anidb is really needed. If we describe anime family as: group of anime titles connected together with strong relations (every part of family must have at least one strong relation with other part of this family, but can also have some weak relations pointing inside or outside of its family) - than families can be easily filtered in process of graphs creating.

Again some metacode:

Code: Select all

  fam_count=0
  family_for_aid= array of int ={0,...,0}
  curr_family=0
  for i in size(animes_table) 
    if family_for_aid[i]=0 then
      fam_count++
      curr_family=fam_count
      family_for_aid[i]=curr_family
      call mark_family(animes[i]) 
    end if
  end for    

  if fam_count==1 then
    create graph using animes and relations
  else
    for i=1 to fam_count 
     -- copy family members
      f_animes = subarray of animes where family_for_aid=i
     -- copy relations from family members
      f_relations = subarray of relations where relation.left(family_for_aid=i) 
     -- add animes related by family members but from anothwr family
      append to f_animes animes where f_relations.right=aid
    create graph using f_animes and f_relations
    use that specific graph for animes to all members of family nbr i
  end for 


 proc mark_family(aid) 
    for j=1 to size(relations_table) 
      if relations_table[j].left=aid or
         and relation_is_strong(relations_table[j].type)
      then
        aib=relations[j].right 
        -- now serch for positions of aib in animes_table -> 
        k=position of aib in animes_table 
        if (family_for_aid[k]=0) then 
          family_for_aid[i]=curr_family
          -- follow to other family titles 
         call mark_family(aib) 
        end if 
      end if 
    end for 
end proc
Only problem left is to define what is weak and what is strong relation.
Short assumption
strong: prequel, sequel, side strony, main story, alternative version
weak: all other
But there are some exceptions and this can be improved (i would add not only weak/strong mark to relation, but some more fields:
relation: weak / strong
common characters: none / partially (some minor, some main) / most of them
common setting: none / partially / exactly the same
timeline interval (mainly for prequel/sequel): unknown / shared timeline / none or short interval (sequel starts in time of prequel ends) / long interval
story likeness: none / similar / the same (continued)
Rar
AniDB Staff
Posts: 1471
Joined: Fri Mar 12, 2004 2:41 pm
Location: UK
Contact:

Post by Rar »

I'd say there are three short-term priorities:
# Fix the black bar error caused by adding the new type (and hopefully safeguard against such things in the future)
# Change the format to alpha png, the grey gifs are just ugly in the new style
# Do something to break up some of the monster graphs

Egg's pretty much got the first two sorted already, just need to bug exp before he runs off galavanting for months. The last is tricky, but even the 'worst case' option, of a different image for all anime with relations, is not nearly the problem it would have been on the old server. Relations are updated relatively infrequently, and the presentation doesn't encourage browsing between different rel graphs in a related series.

As for the big goal of just making rel graphs better, it's something interested parties can work on over time, it's not that hard to poke the dot format to do different things. Would help maybe, having the code that makes them...

Rar
egg
Posts: 769
Joined: Tue Nov 11, 2003 7:17 am

Post by egg »

The purpose of this thread was to have a discussion on a way to break up the monster graphs. I have played with the formatting of some of the larger graphs and tried laying them out with various options, and although they can be better than the originals, many still leave something to be desired AND the rules needed to make the large graphs layout better, sometimes make the smaller graphs look worse.

The main issue is that there are ‘weak’ links that cause graphs to become extremely complex. For example, consider A<----->B<----->C if both relations are ‘other’, A and C may not have anything to do with each other. In small cases like this, it is not much of a deal, but when you end up with two groups of animes that are related in such a manner, the graphs can become quite complex. The best way of dealing with this situation is to not have the weak links propagate, that is the weak link and the anime it is linked to is shown, but other things linked to that anime are not. For instance, if you looked at the graph for A, it would be: A<- - ->B*, and the graph for C would be: *B<- - ->C.

So if weak links do not propagate, the question is, how are weak links determined? Anyway, there are a few options:
1) Define certain types of links as weak (for instance other and character). This is the simplest to implement, but it can lead to undesirable results if one of those types of links is used in a situation where it really should not be considered weak.

2) Elias’ proposal: Define some logic (based on the number of nodes in the graph and type of links), to determine if a link should be defined as weak. This would allow for some propagation of weak links in small graphs, but not large ones. Should also be fairly easy to implement, but makes the logic much more complex.

3) kidan pointed out, the idea of a flag to mark a relation as weak was discussed. This would be harder to implement, but would greatly add to the flexibility. This would mean that there would be control over when a link is considered link and it could be applied to any type of link. This could be managed by the mods. This would require an interface to mark links as weak, an interface for the mods, and probably a DB change. Elias also mentioned that a few more link fields may be handy.

4) I had proposed an idea of having anime families. This would provide practically the same end result as #3 but takes the opposite approach. Rather than mark a relation as weak, it groups animes into a family, anything within that family would be considered strong, and something external would be considered weak. This would also make it possible to have a named list of everything in a family that would be searchable, not necessary for the current issue but would be nice to have in the future. This is probably the hardest to implement.

Whichever method is chosen to determine ‘weak’ links, when the links are graphed, I recommend putting in a dashed line [style="dashed"] to signify that it is a weak link.

Note that having weak links will cause the server to have to create more graphs (in the example above, A, B and C would all have unique graphs), but each graph will usually be simpler (less CPU to generate) and smaller (less storage and bandwidth).

Personally I prefer solutions 3 & 4. Both allow the users [and mods] to determine what is weak and not some arbitrary rule.
Elias
Posts: 242
Joined: Tue Feb 17, 2004 4:55 pm

Post by Elias »

egg wrote: 1) Define certain types of links as weak (for instance other and character). This is the simplest to implement, but it can lead to undesirable results if one of those types of links is used in a situation where it really should not be considered weak.

2) Elias’ proposal: Define some logic (based on the number of nodes in the graph and type of links), to determine if a link should be defined as weak. This would allow for some propagation of weak links in small graphs, but not large ones. Should also be fairly easy to implement, but makes the logic much more complex.
My proposal was equal to 1 (define some certain types links as strong and some as weak, not determining type of link), it was just try to automatic way of getting families and graphs for them. In first approach i wanted to generate graph for each anime differently (adding to graph all its family members and strong links but weak links only from/to this specific member of family) and in second time common graph for each anime family (showing also all weak links from all family members).
egg wrote:anything within that family would be considered strong
I disagree. Example: AA! Megami-sama family,
AA! Megami-sama: Chichaitte Koto wa Benri da ne - is a member of this family, but has not strong connections with other members
The same goes for X2 Double X from X-family.
Locked