
I've started and abandoned many ideas. It's well into triple digits by now. They range from ideas I realize are bad quickly to ones where it takes too much time to experience that revelation. I usually don't talk about ideas I didn't follow through on. I'd like to post things more often though. I think I'll discuss some of these from time to time, if they are well thought out enough to discuss.
A little while ago I looked into writing a pro wrestling title crossover grid game. If you're unfamiliar with the concept, it involves matching things across categories in a 3x3 grid:

I've seen some pro wrestling themed grids before. They involved major events and who wrestled who. For example, two categories might be "Wrestlemania 2000" and "lost to John Cena". Sometimes they include a major title as a category. This is all neat but I wanted something that only used championships.
Something like this:

I would play a game like this every day if it existed. It seems simple to build on the surface. There are some difficult challenges involved though.
This biggest is that in most grids an entry can only be used once. In this example I made in a few minutes, I think it’s possible to create an unwinnable state. In the first column there are only 2-3 possible values for each crossover. The second column, first row especially, has few options. The bottom right corner has more possibilities than you might think though.
That's the difficult technical challenge - ensuring each grid is winnable. The simplest way to solve that is to ensure each box has 9 possible values. Worst case then is all 9 have the exact same valid 9 entries. If every box had just 8 possible values then there’s work involved to figure out if an unwinnable state can be achieved.
Rather than think about that, I'm going to tackle the easy problem first - a data model.
First some requirements:
1) This grid only cares about who held a championship - when they held it is irrelevant.
2) Alternate names need to be supported. If "Mick Foley" is entered it should count for any title he held under any name. One consequence of this is entering "Mankind" would hit for titles held prior to the existence of that gimmick. I'm 1000% OK with this. This is also partially why I will never finish this project, or never publish it if I do. The amount of complaints about insignificant details like this would be overwhelming. I don't know how I would handle multiple wrestlers using the same gimmick. I don't believe there are many title holders in that group though.
The data model is very simple then. This assumption means I'll later find it requires something complex. Here's what it looks like if the WCW Cruiserweight Tag Team Championship is the first one entered:

Although I chose this title because of my warped way of thinking it raises some interesting design thoughts. There are exactly 4 people who held the WCW Cruiserweight Tag Team Championship, the matches involved with this title were all great BTW. This would make it a completely impractical category to include. Unless, unless, there was a way to guarantee that these 4 wrestlers only appeared in one other crossover category each. That is not easy... Kid Romeo only ever held one other title and it was extremely niche. The title history is only listed on a tripod page if that helps explain my definition of "niche". Rey Mysterio has the exact opposite problem. He has held so many titles that he could be used in a square that then locked out another one because he's the last (or only) valid option.
I don't want to make something that involves memorizing very niche combinations.
I need to find a way to build grids that are solvable. I could do this manually, in conjunction with some spreadsheets. Maybe that would be OK for a weekly game or whatever. What about some kind of infinite random version? Something where one category is selected randomly and the other 5 are built around that. This is probably too ambitious. It's also a graph theory problem I think. It's been a while since I took that course, over 20 years now. I remember enjoying the subject but doubt I can remember a single algorithm.
I'm going to create some actual data to figure this out. Digging a formula out of some dark recess in my memory is possible. I usually start on problems by kicking them around for a while first.
I'm going to load up the list of reigns for 30 titles into a database. Or really the names of everyone who has held 30 different titles. 29 of them are ones that I think would work well in this kind of grid. 1 is not going to work well and is included by accident for testing. In case you're curious, Chris Jericho has the lead by appearing in 11 of the lists I chose.
Although this did not take long, it reminds me why this was a bad idea. For example, there are two different NWA World Tag Team titles that overlap. One of which has a team with a reign of negative length.
I'm using sqlite3 for this because it will reduce the temptation to try and make this into a real thing. This is supposed to be about a project I abandoned, this is a lot of work already for that.
Let's create some tables:
CREATE TABLE title (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL UNIQUE);
CREATE TABLE wrestler (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name TEXT NOT NULL UNIQUE);
CREATE TABLE reign (
id INTEGER PRIMARY KEY AUTOINCREMENT,
titleid INTEGER,
wrestlerid INTEGER,
FOREIGN KEY (titleid) REFERENCES title(id),
FOREIGN KEY (wrestlerid) REFERENCES wrestler(id),
UNIQUE (titleid, wrestlerid));
After loading some data, and running a few queries to find sets with high overlap, it's trivial to create a grid that is easily solvable through a few queries:

It also reinforces the biggest non-technical problem with this grid...
There are just so many titles with confusing lineages. There are at least 3 WWF/WWE tag team title lines. There are multiple WWF/WWE world titles not even counting things that used to be called something like that.
I'm going to try one programmatic approach to building grids. It will go like:
1) Choose an "anchor" title at random. This will be column #1.
2) Choose 3 rows that have a high level of overlap with the "anchor" column.
3) Choose the next two columns based on overlap with the 3 rows.
4) Optional: validate the resulting grid doesn't contain an unwinnable state.
For the last point, I'm defining a cell as being solvable if:
1) It contains 9 or more values for reasons previously mentioned.
2) It contains 1 or more unique values, meaning a name that doesn't appear in any other cell. This will also result in the kind of grid I already complained about where some cells require knowing obscure title combinations.
Will I try a different approach when this doesn't work? Who knows, not even me.
OK, let's start with some simple code, classes for the two data entities (which for this trivial example could be the same):
public class Title{
public int id;
public String name;
}
public class Wrestler{
public int id;
public String name;
}
Now some basic data access code:
private final String connectionString="jdbc:sqlite:/[PATH-TO-DB].db";
private Connection connection=null;
public void connect() throws Exception{
this.connection=DriverManager.getConnection(connectionString);
}
public ResultSet runSql(String sql) throws Exception{
PreparedStatement preparedStatement=connection.prepareStatement(sql);
return(preparedStatement.executeQuery());
}
Now we're going to write 3 query builders. The first is to query for titles ranked by the number of reigns. It could be used to loop through the top [x] titles or just return one (which is what I will do later).
public ArrayList<Title> getTitlesRankedByReigns(int minSize,int limit) throws Exception{
ArrayList<Title> list=new ArrayList<Title>();
StringBuffer sb=new StringBuffer();
sb.append("select t.id, t.name, count(*) as c from title t ");
sb.append("inner join reign r on r.titleid = t.id ");
sb.append("group by t.id, t.name having c >= ");
sb.append(minSize);
sb.append(" order by c desc limit ");
sb.append(limit);
sb.append(";");
ResultSet resultSet=runSql(sb.toString());
while(resultSet.next()){
Title t=new Title();
t.id=resultSet.getInt("id");
t.name=resultSet.getString("name");
list.add(t);
}
return(list);
}
The next query builder looks for overlaps between one or more titles. So for example, this could be passed only the anchor column to get the top overlapping titles. It could also be passed five titles in an attempt to find the best final selection. It's fairly flexible that way.
public ArrayList<Title> getOverlap(int[] titles,int minSize,int limit) throws Exception{
ArrayList<Title> list=new ArrayList<Title>();
StringBuffer sb=new StringBuffer();
sb.append("select t.id, t.name, count(distinct r.wrestlerid) as overlapcount from title t ");
sb.append("join reign r on t.id = r.titleid where ");
for(int i=0;i<titles.length;i++){
sb.append("r.wrestlerid in ( select wrestlerid from reign where titleid = ");
sb.append(titles[i]);
sb.append(" )");
if(i!=(titles.length-1)){
sb.append(" and ");
}
}
sb.append(" and t.id not in (");
for(int i=0;i<titles.length;i++){
sb.append(titles[i]);
if(i!=(titles.length-1)){
sb.append(", ");
}
}
sb.append(") ");
sb.append("group by t.id having overlapcount >= ");
sb.append(minSize);
sb.append(" order by overlapcount desc limit ");
sb.append(limit);
sb.append(";");
ResultSet resultSet=runSql(sb.toString());
while(resultSet.next()){
Title t=new Title();
t.id=resultSet.getInt("id");
t.name=resultSet.getString("name");
list.add(t);
}
return(list);
}
The last query builder finds all wrestlers that intersect two titles.
public ArrayList<Wrestler> getIntersection(int title1,int title2) throws Exception{
ArrayList<Wrestler> list=new ArrayList<Wrestler>();
StringBuffer sb=new StringBuffer();
sb.append("select distinct w.id, w.name from wrestler w ");
sb.append("join reign r1 on w.id = r1.wrestlerid ");
sb.append("join reign r2 on w.id = r2.wrestlerid ");
sb.append("where r1.titleid = ");
sb.append(title1);
sb.append(" and r2.titleid = ");
sb.append(title2);
sb.append(" order by w.name asc;");
ResultSet resultSet=runSql(sb.toString());
while(resultSet.next()){
Wrestler w=new Wrestler();
w.id=resultSet.getInt("id");
w.name=resultSet.getString("name");
list.add(w);
}
return(list);
}
The next block of code will:
1) Select an anchor column by simply choosing the one with the highest number of associated reigns.
2) Looks for three rows, which are simply the three rows that overlap the most with the anchor column.
3) Select the next two columns by how much they overlap with the three rows.
4) Print all the results to the console out of laziness.
WrestlingGrid grid=new WrestlingGrid();
grid.connect();
boolean haveGrid=false;//not really used, just an example of what a real algorithm might use
//only looking at one anchor column for this test
ArrayList<Title> anchorCandidates=grid.getTitlesRankedByReigns(30,1);
int anchorCandidateIndex=0;
while((anchorCandidateIndex<anchorCandidates.size())&(!haveGrid)){
Title[] cols=new Title[3];
Title[] rows=new Title[3];
Title anchor=anchorCandidates.get(anchorCandidateIndex);
cols[0]=anchor;
System.out.println("anchor column");
System.out.println(anchor.id+"|"+anchor.name);
anchorCandidateIndex++;
int[] overlap=new int[1];
overlap[0]=anchor.id;
//only looking at top 3 rows for this test
ArrayList<Title> rowCandidates=grid.getOverlap(overlap,1,3);
rows[0]=rowCandidates.get(0);
rows[1]=rowCandidates.get(1);
rows[2]=rowCandidates.get(2);
overlap=new int[3];
overlap[0]=rows[0].id;
overlap[1]=rows[1].id;
overlap[2]=rows[2].id;
ArrayList<Title> colCandidates=grid.getOverlap(overlap,1,3);
int c1=1;
int c2=0;
while((c1<3)&&(c2<3)){
Title t=colCandidates.get(c2);
if(t.id!=cols[0].id){
cols[c1]=t;
c1++;
c2++;
}else{
c2++;
}
}
//OK, so what do we have now?
for(int c=0;c<3;c++){
for(int r=0;r<3;r++){
System.out.println("[ "+cols[c].name+" X "+rows[r].name+ "]");
System.out.println("--------------------");
ArrayList<Wrestler> intersection=grid.getIntersection(cols[c].id,rows[r].id);
for(Wrestler w:intersection){
System.out.println(w.name);
}
System.out.println("");
}
}
}
I thought this would produce the "best case" result but was sadly mistaken.

Right away one intersection is a problem. It takes a about a minute to see how it can be locked out.

Yes, The Undertaker held the WCW Tag Team Championship. Look it up.
So this idea I had of "most overlap" is quite flawed. So the first three rows need to, I think, have high overlap with the anchor column and low overlap with each other. This is where it becomes a math problem.
Brute force searching is easier to understand than math. So to close this out I'll update the code to do that... and here are some sample grids that will be solvable based on the 30 titles I used.
--------------------
Anchor column: WWE World Tag Team Championship [2002+]
[ WWE World Tag Team Championship [2002+] X WWF/WWE Intercontinental Championship ] = 39
[ WWE World Tag Team Championship [2002+] X NWA/WCW/WWE/WWF United States Championship ] = 33
[ WWE World Tag Team Championship [2002+] X WWE World Tag Team Championship [1971–2010] ] = 33
[ WWF/WWE Championship [1963+] X WWF/WWE Intercontinental Championship ] = 33
[ WWF/WWE Championship [1963+] X NWA/WCW/WWE/WWF United States Championship ] = 25
[ WWF/WWE Championship [1963+] X WWE World Tag Team Championship [1971–2010] ] = 26
[ Mid-Atlantic Championship Wrestling / WCW World Tag Team Championship X WWF/WWE Intercontinental Championship ] = 14
[ Mid-Atlantic Championship Wrestling / WCW World Tag Team Championship X NWA/WCW/WWE/WWF United States Championship ] = 39
[ Mid-Atlantic Championship Wrestling / WCW World Tag Team Championship X WWE World Tag Team Championship [1971–2010] ] = 29
--------------------
Anchor column: WWF/WWE Intercontinental Championship
[ WWF/WWE Intercontinental Championship X NWA/WCW/WWE/WWF United States Championship ] = 42
[ WWF/WWE Intercontinental Championship X WWE World Tag Team Championship [2002+] ] = 39
[ WWF/WWE Intercontinental Championship X WWE World Tag Team Championship [1971–2010] ] = 39
[ WWF/WWE Championship [1963+] X NWA/WCW/WWE/WWF United States Championship ] = 25
[ WWF/WWE Championship [1963+] X WWE World Tag Team Championship [2002+] ] = 25
[ WWF/WWE Championship [1963+] X WWE World Tag Team Championship [1971–2010] ] = 26
[ WWE World Heavyweight Championship [2002–2013] X NWA/WCW/WWE/WWF United States Championship ] = 15
[ WWE World Heavyweight Championship [2002–2013] X WWE World Tag Team Championship [2002+] ] = 16
[ WWE World Heavyweight Championship [2002–2013] X WWE World Tag Team Championship [1971–2010] ] = 14
--------------------
Anchor column: WWF/WWE Championship [1963+]
[ WWF/WWE Championship [1963+] X WWF/WWE Intercontinental Championship ] = 33
[ WWF/WWE Championship [1963+] X WWE World Tag Team Championship [1971–2010] ] = 26
[ WWF/WWE Championship [1963+] X NWA/WCW/WWE/WWF United States Championship ] = 25
[ WWE World Tag Team Championship [2002+] X WWF/WWE Intercontinental Championship ] = 39
[ WWE World Tag Team Championship [2002+] X WWE World Tag Team Championship [1971–2010] ] = 33
[ WWE World Tag Team Championship [2002+] X NWA/WCW/WWE/WWF United States Championship ] = 33
[ Mid-Atlantic Championship Wrestling / WCW World Tag Team Championship X WWF/WWE Intercontinental Championship ] = 14
[ Mid-Atlantic Championship Wrestling / WCW World Tag Team Championship X WWE World Tag Team Championship [1971–2010] ] = 29
[ Mid-Atlantic Championship Wrestling / WCW World Tag Team Championship X NWA/WCW/WWE/WWF United States Championship ] = 39
--------------------
Anchor column: WWE Tag Team Championship [2016+]
[ WWE Tag Team Championship [2016+] X WWE World Tag Team Championship [2002+] ] = 27
[ WWE Tag Team Championship [2016+] X NWA/WCW/WWE/WWF United States Championship ] = 17
[ WWE Tag Team Championship [2016+] X WWF/WWE Intercontinental Championship ] = 17
[ WWF/WWE Championship [1963+] X WWE World Tag Team Championship [2002+] ] = 25
[ WWF/WWE Championship [1963+] X NWA/WCW/WWE/WWF United States Championship ] = 25
[ WWF/WWE Championship [1963+] X WWF/WWE Intercontinental Championship ] = 33
[ WWE World Heavyweight Championship [2002–2013] X WWE World Tag Team Championship [2002+] ] = 16
[ WWE World Heavyweight Championship [2002–2013] X NWA/WCW/WWE/WWF United States Championship ] = 15
[ WWE World Heavyweight Championship [2002–2013] X WWF/WWE Intercontinental Championship ] = 16
--------------------
Anchor column: NXT Championship
[ NXT Championship X NWA/WCW/WWE/WWF United States Championship ] = 10
[ NXT Championship X WWF/WWE Intercontinental Championship ] = 9
[ NXT Championship X WWE World Tag Team Championship [2002+] ] = 9
[ WWF/WWE Championship [1963+] X NWA/WCW/WWE/WWF United States Championship ] = 25
[ WWF/WWE Championship [1963+] X WWF/WWE Intercontinental Championship ] = 33
[ WWF/WWE Championship [1963+] X WWE World Tag Team Championship [2002+] ] = 25
[ WWE World Heavyweight Championship [2002–2013] X NWA/WCW/WWE/WWF United States Championship ] = 15
[ WWE World Heavyweight Championship [2002–2013] X WWF/WWE Intercontinental Championship ] = 16
[ WWE World Heavyweight Championship [2002–2013] X WWE World Tag Team Championship [2002+] ] = 16
--------------------
Anchor column: WWE World Heavyweight Championship [2002–2013]
[ WWE World Heavyweight Championship [2002–2013] X WWF/WWE Championship [1963+] ] = 17
[ WWE World Heavyweight Championship [2002–2013] X WWF/WWE Intercontinental Championship ] = 16
[ WWE World Heavyweight Championship [2002–2013] X WWE World Tag Team Championship [2002+] ] = 16
[ NWA/WCW/WWE/WWF United States Championship X WWF/WWE Championship [1963+] ] = 25
[ NWA/WCW/WWE/WWF United States Championship X WWF/WWE Intercontinental Championship ] = 42
[ NWA/WCW/WWE/WWF United States Championship X WWE World Tag Team Championship [2002+] ] = 33
[ WWE World Tag Team Championship [1971–2010] X WWF/WWE Championship [1963+] ] = 26
[ WWE World Tag Team Championship [1971–2010] X WWF/WWE Intercontinental Championship ] = 39
[ WWE World Tag Team Championship [1971–2010] X WWE World Tag Team Championship [2002+] ] = 33
--------------------
Many of these are just the same categories re-arranged. So far this theoretical game is not fun.
And here is one probably solvable one:
Anchor column: WWF/WWE European Championship
[ WWF/WWE European Championship X WWE World Tag Team Championship [1971–2010] ] = 17
[ WWF/WWE European Championship X WWF/WWE Hardcore Championship ] = 16
[ WWF/WWE European Championship X WWF/WWE Intercontinental Championship ] = 15
[ WWE World Tag Team Championship [2002+] X WWE World Tag Team Championship [1971–2010] ] = 33
[ WWE World Tag Team Championship [2002+] X WWF/WWE Hardcore Championship ] = 11
[ WWE World Tag Team Championship [2002+] X WWF/WWE Intercontinental Championship ] = 39
[ WWF/WWE Championship [1963+] X WWE World Tag Team Championship [1971–2010] ] = 26
[ WWF/WWE Championship [1963+] X WWF/WWE Hardcore Championship ] = 8
[ WWF/WWE Championship [1963+] X WWF/WWE Intercontinental Championship ] = 33
OK... and yes, this one is solvable. Of the 8 who appear in the [ WWF/WWE Championship [1963+] X WWF/WWE Hardcore Championship ] category, two appear only in the [ WWF/WWE Championship [1963+] X WWE World Tag Team Championship [1971–2010] ] category too. So worst case is you pick one there and the other is still available. Again, this is not fun.
These were not every solvable grid, just ones that took minimal (under 5 minutes) coding effort to find.
There are many other ways I can tackle this problem but at this point I just don't want to. I thought about this enough and it is no longer interesting.
Now for a few more reasons I will not finish this:
1) Previously mentioned, if this was a public thing it would receive so many complaints I'd take it down in a day.
2) Keeping the database up to date sounds miserable.
3) Would a game like this get sued by an IP holder? Whether or not they have a legitimate case is irrelevant.
4) I really don't want to learn Electron or whatever UI is best for something like this. If I thought of this idea in 1998 it would be a Visual Basic application for sure. I still may do that.
5) In the unlikely event a game like this went viral it would get expensive to host fast. It would also increase the likelihood of item #3 occurring.
6) After going through some examples, and data, I can see why no one has done this. The resulting game would have a couple fun grids and hundreds of annoying ones. I suppose adding other categories like major events would create more possibilities, and also more confusion. For example, would dark matches count?
OK, so again, this was a lot of work for an idea I'll never finish.
Related