Go to Post Im very proud of my kids, and my whole team, the passion and emotion here is what FIRST is all about :) - Kims Robot [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #136   Spotlight this post!  
Unread 07-04-2008, 09:30
Bongle's Avatar
Bongle Bongle is offline
Registered User
FRC #2702 (REBotics)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Waterloo
Posts: 1,069
Bongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond repute
Send a message via MSN to Bongle
Re: Offensive Power Rankings for 2008

Here is every single regional. The ordering isn't sorted. The files are just txt files with funny names, just rename the .out extension.

Quote:
Off subject a little--Is there a csv with all the teams and their addresses that I can get my hands on. I would love for my Geospatial Tech class to use the opr data and do some geocoding to look at trends.
You can get their cities pretty easily off of usfirst.org, but I don't know about addresses.
Attached Files
File Type: zip AllRegs.zip (16.6 KB, 179 views)

Last edited by Bongle : 07-04-2008 at 09:35.
Reply With Quote
  #137   Spotlight this post!  
Unread 07-04-2008, 10:54
petek's Avatar
petek petek is offline
What would Dave do?
AKA: Peter Kieselbach
FRC #3654 (Tech Tigers)
Team Role: Mentor
 
Join Date: May 2002
Rookie Year: 2002
Location: Middletown, CT
Posts: 923
petek has a reputation beyond reputepetek has a reputation beyond reputepetek has a reputation beyond reputepetek has a reputation beyond reputepetek has a reputation beyond reputepetek has a reputation beyond reputepetek has a reputation beyond reputepetek has a reputation beyond reputepetek has a reputation beyond reputepetek has a reputation beyond reputepetek has a reputation beyond repute
Send a message via AIM to petek
Re: Offensive Power Rankings for 2008

From the "throw a monkey wrench and see what happens dept.":
Has anyone looked to see how much effect surrogate matches have on these rankings? If the number of matches per team determines the matrix size, is the calculation looking to see how many matches a given team actually played? For example, in Philly all teams played 11 matches, but 304 and 381 each played 12: 11 plus one extra surrogate match.

For those not familiar, surrogates are called for to "fill out" the schedule when the number of teams x the number of matches / 6 is not a whole number. Without surrogates there would be some matches with un-filled robot positions. Surrogate match results are not counted in FIRST's ranking scores, and are identified by a "1" next to the team # in the qualifying schedule. This year it is always the third match for a surrogate team.
__________________
Pete Kieselbach
#4

Reply With Quote
  #138   Spotlight this post!  
Unread 07-04-2008, 13:24
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,045
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
Re: Offensive Power Rankings for 2008

Quote:
Originally Posted by Guy Davidson View Post
I think relying on any one tool too much to make a decision is a bad idea. Look, for example at what NFL teams do before they draft someone: watch game video, look at game statistics, look at the player during workouts, look at iq tests, personal intrviews, and more. Similarly, the best scouring teams in Atlanta will combine several different measurements and inputs to make their lists. I imagine they will go around talking to teams and getting an impression of their strategy, gameplanning, and experience. I bet they will have people recording matches and looking at what each team does, driver skill, performance, etc. I would guess they also watch some teams' recorded matches, especially from eliminations, to see how those teams fair when it's make-it or break-it time. A combination of these different tools is what will probably lead the eventual winning alliance captain to compile its alliance.
Another thing OPR can't predict is the effect installing any robot upgrades will have on a team's performance at the Championship. Only effective scouting can identify such teams who make any significant changes to their bots in Atlanta which improve their overall scoring output.
__________________

Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner
Reply With Quote
  #139   Spotlight this post!  
Unread 07-04-2008, 13:43
XaulZan11's Avatar
XaulZan11 XaulZan11 is offline
Registered User
AKA: John Christiansen
no team
Team Role: Mentor
 
Join Date: Nov 2006
Rookie Year: 2006
Location: Milwaukee, Wi
Posts: 1,326
XaulZan11 has a reputation beyond reputeXaulZan11 has a reputation beyond reputeXaulZan11 has a reputation beyond reputeXaulZan11 has a reputation beyond reputeXaulZan11 has a reputation beyond reputeXaulZan11 has a reputation beyond reputeXaulZan11 has a reputation beyond reputeXaulZan11 has a reputation beyond reputeXaulZan11 has a reputation beyond reputeXaulZan11 has a reputation beyond reputeXaulZan11 has a reputation beyond repute
Send a message via AIM to XaulZan11
Re: Offensive Power Rankings for 2008

To build on what others have said about the shortcommings of the OPR, watching the actual matches is a ton better than just looking at the OPR. The OPR attempts to predict how well a team scores per match, and is just decent at it. Relying on only the OPR is like a weatherman predicting the weather simply looking at on the month's average weather, instead of actually looking at the weather patterns, air pressure and all the other stuff weather people look at when making the forcast. By looking at the averages I'll know tommorrow it will be fairly warm, but won't tell me if I should bring a jacket, umbrella or sunglasses. OPR is nice because it gives a rough or general idea about a team very quickly and easily, but to get a good idea about a team, you need to actually watch thier matches.

I would use it only in prescouting where there is no matchs online of the team. In this situation it is better than no information at all.

EDIT: One of the shortcommings is that the OPR attempts to predict something that can be found--the team's contribution to thier alliance--by watching the team's matches. It is nice that is very easy to find, but its not like it is predicting something that we cannot find.

Last edited by XaulZan11 : 07-04-2008 at 13:53.
Reply With Quote
  #140   Spotlight this post!  
Unread 07-04-2008, 14:26
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,559
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Offensive Power Rankings for 2008

Quote:
Originally Posted by XaulZan11 View Post
Like 171/2194, 1732 recorded the amount of points a team scored per match at Wisconsin. We kept track of lines and balls knocked down in hybrid, laps, hurdlers, herds and balls placed at the end.

I ran a correlation test to see how related the two sets of data are and see how good the OPR is at predicting how many points a team scores per match. There are some assumptions/problems. First, our scouting data isn't perfect so there is some error from that. Secondly, our scouting data doesn't include penalties, but the ORP does account for them. So, when doing a linear regression, I got an R value of .7841 and an R-squared value of .6149. (A perfect relationship would have an R value of -1 or 1 and no relationship would be 0). So, while it is not pefect (not surprising) the ORP is a fairly good predictor of a team's preformance.
I did the same with 330's scouting data for San Diego and LA. We do account for penalties.

For SD, the R value was .8852 and R-squared of .7836
For LA, the R value was .8490 and R-squared of .7200

When I removed penalties from the equation, the SD R value fell to .8620 and the LA R value fell to .8345

Last edited by Joe Ross : 07-04-2008 at 14:40.
Reply With Quote
  #141   Spotlight this post!  
Unread 07-04-2008, 15:32
Unsung FIRST Hero
Greg Marra Greg Marra is offline
[automate(a) for a in tasks_to_do]
FRC #5507 (Robotic Eagles)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2005
Location: San Francisco, CA
Posts: 2,030
Greg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond repute
Re: Offensive Power Rankings for 2008

Quote:
Originally Posted by DRH2o View Post
Off subject a little--Is there a csv with all the teams and their addresses that I can get my hands on. I would love for my Geospatial Tech class to use the opr data and do some geocoding to look at trends.
http://www.thebluealliance.net/cdvid...4_07_teams.csv

Full DB dump of the interesting bits. Enjoy!

Last edited by Greg Marra : 07-04-2008 at 15:36.
Reply With Quote
  #142   Spotlight this post!  
Unread 07-04-2008, 15:38
Madison's Avatar
Madison Madison is offline
Dancing through life...
FRC #0488 (Xbot)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1999
Location: Seattle, WA
Posts: 5,243
Madison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond reputeMadison has a reputation beyond repute
Re: Offensive Power Rankings for 2008

Quote:
Originally Posted by XaulZan11 View Post
To build on what others have said about the shortcommings of the OPR, watching the actual matches is a ton better than just looking at the OPR. The OPR attempts to predict how well a team scores per match, and is just decent at it. Relying on only the OPR is like a weatherman predicting the weather simply looking at on the month's average weather, instead of actually looking at the weather patterns, air pressure and all the other stuff weather people look at when making the forcast. By looking at the averages I'll know tommorrow it will be fairly warm, but won't tell me if I should bring a jacket, umbrella or sunglasses. OPR is nice because it gives a rough or general idea about a team very quickly and easily, but to get a good idea about a team, you need to actually watch thier matches.

I would use it only in prescouting where there is no matchs online of the team. In this situation it is better than no information at all.

EDIT: One of the shortcommings is that the OPR attempts to predict something that can be found--the team's contribution to thier alliance--by watching the team's matches. It is nice that is very easy to find, but its not like it is predicting something that we cannot find.
Teams may interpret "scoring" differently in their scouting systems. If Team A cannot hurdle, but can place the ball on the overpass and Team B cannot place the ball, but can knock it down, together they can hurdle. Individually, their contributions, however, would not indicate that possibility and would reflect only points scored by receiving a bonus at the end of the match or by knocking balls down in hybrid mode.
__________________
--Madison--

...down at the Ozdust!

Like a grand and miraculous spaceship, our planet has sailed through the universe of time. And for a brief moment, we have been among its many passengers.
Reply With Quote
  #143   Spotlight this post!  
Unread 07-04-2008, 15:46
fuzzy1718 fuzzy1718 is offline
MTU class of '15
no team
Team Role: Alumni
 
Join Date: Feb 2007
Rookie Year: 2007
Location: The UP and the LP, Michigan
Posts: 176
fuzzy1718 has a brilliant futurefuzzy1718 has a brilliant futurefuzzy1718 has a brilliant futurefuzzy1718 has a brilliant futurefuzzy1718 has a brilliant futurefuzzy1718 has a brilliant futurefuzzy1718 has a brilliant futurefuzzy1718 has a brilliant futurefuzzy1718 has a brilliant futurefuzzy1718 has a brilliant futurefuzzy1718 has a brilliant future
Question Re: Offensive Power Rankings for 2008

A little off topic, but how did our team drop points, when we havn't played a regional? From 37.472 to 32.54432471??? Our last regional was GLR ??????
__________________
What FIRST has taught me:

Money is not everything.

In order to change a culture one must change the hearts of the next generation.

The fish rots from the head down.

Why we do something is often more important than what we do.

Repeated success is often sown on the backs of a few, but reaped by many.
Reply With Quote
  #144   Spotlight this post!  
Unread 07-04-2008, 16:00
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Offensive Power Rankings for 2008

Quote:
Originally Posted by fuzzy1718 View Post
A little off topic, but how did our team drop points, when we havn't played a regional?
Do you understand the math behind the rankings? Your apparent drop can be explained easily if some of the teams you played with scored more points in later regionals. The algorithm doesn't account for different strengths at different times for the same team. It would tend to overcount an improving team's contribution to earlier matches, and thus undercount its partners' contribution.
Reply With Quote
  #145   Spotlight this post!  
Unread 07-04-2008, 19:01
MasterChief 573's Avatar
MasterChief 573 MasterChief 573 is offline
The Juggernaut
AKA: David McDonald
FRC #0573 (Mech Warriors)
Team Role: Mechanical
 
Join Date: Apr 2006
Rookie Year: 2005
Location: Michigan
Posts: 266
MasterChief 573 is just really niceMasterChief 573 is just really niceMasterChief 573 is just really niceMasterChief 573 is just really nice
Send a message via MSN to MasterChief 573
Re: Offensive Power Rankings for 2008

Quote:
Originally Posted by fuzzy1718 View Post
A little off topic, but how did our team drop points, when we havn't played a regional? From 37.472 to 32.54432471??? Our last regional was GLR ??????
Same thing happened to us too, that happens if you performed better at a previous regional as opposed to your last one.
__________________


2007 Great Lakes Regional Champs!
2007 Great Lakes Regional #2 Seed
2007 Boilermaker Regional Quarterfinalist
2007 21-8-1 Record
Reply With Quote
  #146   Spotlight this post!  
Unread 07-04-2008, 20:02
Bongle's Avatar
Bongle Bongle is offline
Registered User
FRC #2702 (REBotics)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Waterloo
Posts: 1,069
Bongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond repute
Send a message via MSN to Bongle
Re: Offensive Power Rankings for 2008

Someone (don't know if he wants to be revealed) via PM requested the algorithm I've been using, which meant I had to clean my code, which means I'm not as embarrassed to post it.

So here it is:
Code:
// opr.cpp : Defines the entry point for the console application.
//

#include "stdafx.h" // if you're not using visual studio, you'll probably have to toast this line

#include <fstream>
#include <iostream>
#include <vector>
#include <set>
#include <map>
#include "jama/jama_lu.h"

using namespace std;

struct Match
{
	Match()
	{
		memset(this,0,sizeof(Match));
	}
	int blue[3];
	int red[3];
	int blueScore;
	int redScore;
};

// reads all the match data from files copy/pasted from usfirst.org into a list of Match structures
// note that week 1, 2008 files can't be read unmodified by this function
// what I've been doing is pre-processing them doing a find-replace on AM and PM and adding " X " so that they have the right number of tab-seperated values
void ReadTeamData(string strFile,vector<Match>& lstMatches,set<int>& setTeams)
{
	ifstream inFile;
	inFile.open(strFile.c_str());
	
	if(inFile.fail())
	{
		cout<<"Error opening file"<<endl;
		return;
	}

	//int iTheoryMatchNum = 0;
	while(!inFile.eof())
	{
		char buf[512];
		Match aNewMatch;

		inFile>>buf; // "9:20"
		inFile>>buf; // "AM/PM"
		inFile>>buf; // match number

		
		inFile>>buf; // red 1		
		aNewMatch.red[0] = atoi(buf);
		inFile>>buf; // red 2
		aNewMatch.red[1] = atoi(buf);
		inFile>>buf; // red 3
		aNewMatch.red[2] = atoi(buf);

		inFile>>buf; // blue 1
		aNewMatch.blue[0] = atoi(buf);
		inFile>>buf; // blue 2
		aNewMatch.blue[1] = atoi(buf);
		inFile>>buf; // blue 3
		aNewMatch.blue[2] = atoi(buf);

		

		inFile>>buf;
		aNewMatch.redScore = atoi(buf);
		inFile>>buf;
		aNewMatch.blueScore = atoi(buf);

		if(aNewMatch.redScore < 0 || aNewMatch.redScore > 168 || aNewMatch.blueScore < 0 || aNewMatch.blueScore > 168)
		{
			cout<<"Warning.  Score of "<<aNewMatch.redScore<<" or of "<<aNewMatch.blueScore<<" is unexpectedly large or small.  The input file may be badly formatted"<<endl;
		}
		if(!setTeams.count(aNewMatch.red[0])) setTeams.insert(aNewMatch.red[0]);
		if(!setTeams.count(aNewMatch.red[1])) setTeams.insert(aNewMatch.red[1]);
		if(!setTeams.count(aNewMatch.red[2])) setTeams.insert(aNewMatch.red[2]);
		if(!setTeams.count(aNewMatch.blue[0])) setTeams.insert(aNewMatch.blue[0]);
		if(!setTeams.count(aNewMatch.blue[1])) setTeams.insert(aNewMatch.blue[1]);
		if(!setTeams.count(aNewMatch.blue[2])) setTeams.insert(aNewMatch.blue[2]);
		
		lstMatches.push_back(aNewMatch);
		
	}
}
// generates a mapping from team #s to row#s and the reverse
void GenerateTeamToRow(const set<int> setTeams,map<int,int>& mapTeamToRow,map<int,int>& mapRowToTeam)
{
	int iCounter = 0;
	for(set<int>::const_iterator i = setTeams.begin();i != setTeams.end();i++)
	{
		mapTeamToRow[*i] = iCounter;
		mapRowToTeam[iCounter] = *i;
		iCounter++;
	}
}
// increments the symmetric points in a matrix to indicate that a pair of teams played with each other
void IncMatrix(TNT::Array2D<double>& M,map<int,int> mapTeamToRow,int iTeam1,int iTeam2)
{
	int iRow1 = mapTeamToRow[iTeam1];
	int iRow2 = mapTeamToRow[iTeam2];

	M[iRow1][iRow2]++;
	if(iRow1 != iRow2)
	{
		M[iRow2][iRow1]++;
	}

}
// increments each team's score for all members of an alliance
void IncScore(TNT::Array1D<double>& S,map<int,int> mapTeamToRow,int aTeams[3],int iScore)
{
	for(int x = 0;x < 3;x++)
	{		
		int iRow = mapTeamToRow[aTeams[x]];
		S[iRow] += iScore;
	}
}
// generates our M and S data.  M is an NxN matrix where each cell(i,j) represents how many times team i played with team j
void GenerateBasicMatrix(const vector<Match>& lstMatches,const map<int,int> mapTeamToRow,TNT::Array2D<double>& M,TNT::Array1D<double>& S)
{
	// assertion: M should be fully zeroed at this point
	for(int x = 0;x < lstMatches.size();x++)
	{
		Match m = lstMatches[x];
		
		IncMatrix(M,mapTeamToRow,m.red[0],m.red[0]);
		IncMatrix(M,mapTeamToRow,m.red[1],m.red[1]);
		IncMatrix(M,mapTeamToRow,m.red[2],m.red[2]);

		IncMatrix(M,mapTeamToRow,m.red[0],m.red[1]);
		IncMatrix(M,mapTeamToRow,m.red[0],m.red[2]);
		IncMatrix(M,mapTeamToRow,m.red[1],m.red[2]);


		IncMatrix(M,mapTeamToRow,m.blue[0],m.blue[0]);
		IncMatrix(M,mapTeamToRow,m.blue[1],m.blue[1]); // teams play with themselves too!
		IncMatrix(M,mapTeamToRow,m.blue[2],m.blue[2]);

		IncMatrix(M,mapTeamToRow,m.blue[0],m.blue[1]);
		IncMatrix(M,mapTeamToRow,m.blue[0],m.blue[2]);
		IncMatrix(M,mapTeamToRow,m.blue[1],m.blue[2]);

		IncScore(S,mapTeamToRow,m.red,m.redScore);
		IncScore(S,mapTeamToRow,m.blue,m.blueScore);
	}
	
}
// zeroes out M
void InitMatrix(TNT::Array2D<double>& M)
{
	for(int x = 0;x < M.dim1();x++)
	{
		for(int y = 0;y < M.dim2();y++)
		{
			M[x][y] = 0;
		}
	}
}
// zeroes out S
void InitS(TNT::Array1D<double>& S)
{
	for(int x = 0;x < S.dim1();x++)
	{
		S[x] = 0;
	}
}
// loads all the teams going to championships
void LoadCMPTeams(string strFile,set<int>& lstTeams)
{
	ifstream inF;
	inF.open(strFile.c_str());

	if(inF.fail())
	{
		cerr<<"Failure at opening "<<strFile<<endl;
	}
	while(!inF.eof())
	{
		int iTeam;
		inF>>iTeam;		
		lstTeams.insert(iTeam);
	}
	
}
// reads in the list of regional files that we need to process
void ReadFileList(string strInput,vector <string>& lstFiles)
{
	ifstream inF;
	inF.open(strInput.c_str());
	while(!inF.eof())
	{
		string str;
		inF>>str;
		lstFiles.push_back(str);
	}
}
// writes the power ratings to <strFile>.out
void WritePowerRatings(string strFile,map<int,int> mapRowToTeam,Array1D<double> PowerRatings)
{
	ofstream outF;
	string strOutFile = strFile + ".out";
	outF.open(strOutFile.c_str());

	for(int x = 0;x < PowerRatings.dim();x++)
	{
		int iTeam = mapRowToTeam[x];
		outF<<iTeam<<"\t"<<PowerRatings[x]<<endl;
	}
	outF.close();
}
int main(int argc, char* argv[])
{
	if(argc != 2)
	{
		cout<<"Wrong number of arguments for scripted running, defaulting to using reglist.txt"<<endl;
		argv[1] = "reglist.txt";
	}
	
	vector <string> lstFiles; // all the regional text files to process
	map<int,double> mapTeamToTopScore;
	map<int,double> mapTeamToLastScore;
	map<int,string> mapTeamToBestReg;
	map<int,string> mapTeamToLastReg;
	map<int,bool> mapTeamToBestSet;
	map<int,int> mapTeamToRegCount;
	
	set<int> setAllTeams; // all teams
	set <int> lstChamps; // teams going to champs 
	ReadFileList(argv[1],lstFiles);

	LoadCMPTeams("c:\\cmpTeams.txt",lstChamps); // list of teams going to championships.  If this vector has more than zero entries, then we only print out data for teams going to champs

	for(int x = 0;x < lstFiles.size();x++)
	{		
		set<int> setTeams;		
		map<int,int> mapTeamToRow;
		map<int,int> mapRowToTeam;
		
		vector<Match > lstMatches;
		
		string strFile;		
		strFile = lstFiles[x];
		
		ReadTeamData(strFile,lstMatches,setTeams);					// reads match data
		
		GenerateTeamToRow(setTeams,mapTeamToRow,mapRowToTeam);		// maps each team to a number between 0 and N-1
				
		TNT::Array2D<double> M(setTeams.size(),setTeams.size());	// M
		TNT::Array1D<double> S(setTeams.size());					// S

		InitMatrix(M);
		InitS(S);

		GenerateBasicMatrix(lstMatches,mapTeamToRow,M,S); // makes M from the match list data		

		JAMA::LU<double> aMatrixSolver(M);
		Array1D<double> PowerRatings = aMatrixSolver.solve(S); // solves MO = S.  PowerRatings = solved O

	    
		WritePowerRatings(strFile,mapRowToTeam,PowerRatings); // writes the output for this regional to <strFile>.out

		// records a team's last and best power ratings
		for(int x = 0;x < PowerRatings.dim();x++)
		{
			if(lstChamps.size() == 0 || lstChamps.count(mapRowToTeam[x]))
			{
				
				double dPwr = PowerRatings[x];
				int iTeam = mapRowToTeam[x];
				if(setAllTeams.count(iTeam) == 0) // if this team hasn't made it into our list of all teams, add it
				{					
					setAllTeams.insert(iTeam);
				}
				mapTeamToRegCount[iTeam]++;
				if(dPwr > mapTeamToTopScore[iTeam] || mapTeamToBestSet[iTeam] == false)
				{
					mapTeamToTopScore[iTeam] = dPwr;
					mapTeamToBestReg[iTeam] = strFile;
					mapTeamToBestSet[iTeam]  =true;
				}
				mapTeamToLastScore[iTeam] = dPwr;
				mapTeamToLastReg[iTeam] = strFile;
			}
		}
	} // end of file loop
	
	// this prints out a team's last OPR and where it occurred.  If a team's best OPR occurred elsewhere, it prints that out
	cout<<"Team\tRegional Count\tLast OPR\tLast Regional\tBest OPR\tBest Regional"<<endl;
	for(set<int>::iterator i = setAllTeams.begin();i != setAllTeams.end();i++)
	{
		int iTeam = *i;

		cout<<iTeam<<"\t"<<mapTeamToRegCount[iTeam]<<"\t"<<mapTeamToLastScore[iTeam]<<"\t"<<mapTeamToLastReg[iTeam];
		
		cout<<"\t"<<mapTeamToTopScore[iTeam]<<"\t"<<mapTeamToBestReg[iTeam];			
		
		cout<<endl;
	}

	return 0;
}
Required files:
-Reglist.txt - a list of regional data to be processed. One file per line. Note that it will output a file for each file in this list, and that will be the OPR for that regional
-cmpteams.txt - A list of teams that you're interested in (for example, a list of teams going to championships). One team per line.
-the JAMA math library (see attached file). This is from the NIST, it should be ok to redistribute. You can get the actual file here: http://math.nist.gov/tnt/download.html

------------
Licensing: None, do whatever you want with it. Feel free to give me credit or something though (but you don't have to, if it'd cramp your style).
Attached Files
File Type: zip jama.zip (69.7 KB, 79 views)
File Type: txt sampleRegInput.txt (3.8 KB, 78 views)
File Type: txt sample_CMPTeams.txt (1.7 KB, 77 views)
File Type: txt sample_reglist.txt (10 Bytes, 73 views)
Reply With Quote
  #147   Spotlight this post!  
Unread 08-04-2008, 00:45
Unsung FIRST Hero
Greg Marra Greg Marra is offline
[automate(a) for a in tasks_to_do]
FRC #5507 (Robotic Eagles)
Team Role: Mentor
 
Join Date: Oct 2004
Rookie Year: 2005
Location: San Francisco, CA
Posts: 2,030
Greg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond reputeGreg Marra has a reputation beyond repute
Re: Offensive Power Rankings for 2008

http://www.thebluealliance.net/cdvid...08_matches.csv

Match dump including New York City regional. Includes column with event name and event week. Provides column with competition level (to filter out elims, if you want) and match number (probably not useful). Filters out matches with incomplete information.
Reply With Quote
  #148   Spotlight this post!  
Unread 08-04-2008, 02:49
Guy Davidson Guy Davidson is offline
Registered User
AKA: formerly sumadin
FRC #0008 (Paly Robotics)
Team Role: Alumni
 
Join Date: Mar 2005
Rookie Year: 2005
Location: Ra'anana, Israel
Posts: 660
Guy Davidson is a splendid one to beholdGuy Davidson is a splendid one to beholdGuy Davidson is a splendid one to beholdGuy Davidson is a splendid one to beholdGuy Davidson is a splendid one to beholdGuy Davidson is a splendid one to beholdGuy Davidson is a splendid one to beholdGuy Davidson is a splendid one to behold
Send a message via ICQ to Guy Davidson Send a message via AIM to Guy Davidson Send a message via MSN to Guy Davidson
Re: Offensive Power Rankings for 2008

With Greg's new dump, I'm proud to present: my complete OPR rankings. These include every match in the TBA system, including eliminations, broken down as follows: one sheet overall, one sheet for each week, two combined sheets (combining the weekly and overall rankings): one normal, and one with repeats in the top 50 or so color labeled.

Note: the following includes teams' overall performances as well as their weekly ones. If you wish to disregard the overall ones, subtract one from all numbers

1114 have the top 3 and 4 out of the top 10 performances overall. 233 have 2 out of the top 10, as do 2056. 330, 987, and 2056 also all have 3 in the top 20, with 39 having 2. Other notable repeats include 217 (3 performances in the 21-42 range), 67 (same), 525 (same), 1124 (2 in 21-41), 40 (same), 1625 (2 in top 50), 103 (same, including the 13th best).

Here are the top 50 performances, be them weekly or overall:
Code:
1114	78.07555206	5
1114	71.72841092	4
1114	66.08610526	All
233	54.83482914	5
2056	54.18143261	All
40	52.36761871	5
39	52.02981858	5
233	51.19444477	All
2056	50.85653031	5
1114	49.80987076	1
330	49.67085518	4
987	49.49921146	2
103	49.17875705	5
330	48.61508348	All
987	48.54535978	5
987	48.4036174	All
2056	48.14940049	4
39	48.05951704	All
330	47.6733788	2
525	47.50920616	5
217	47.21258553	3
79	46.85564663	3
1731	46.67751354	4
217	46.39477357	5
525	45.53997317	All
254	45.22118025	5
2171	44.91825888	4
1024	44.74816411	4
67	44.18768501	All
175	43.88978378	3
1124	43.87787986	3
27	43.73318232	5
1625	42.9666571	5
1731	42.93375969	All
67	42.26870256	5
217	42.11651285	All
1124	41.9143175	All
1717	41.6884957	4
67	41.29809056	2
25	41.18181687	5
40	40.80843761	All
525	40.68607417	1
1625	40.49393267	3
494	40.49077186	5
103	40.01593827	All
93	39.93271964	5
968	39.86958078	2
233	39.20154265	3
175	39.16106424	All
469	39.06852953	3
Attached in a zip file is my complete excel spreadsheet.

Enjoy
Attached Files
File Type: zip combined opr.zip (225.8 KB, 95 views)
__________________
Reply With Quote
  #149   Spotlight this post!  
Unread 08-04-2008, 07:03
rsilverstein's Avatar
rsilverstein rsilverstein is offline
Ross Silverstein
FRC #1717 (D'Penguineers)
Team Role: Alumni
 
Join Date: Aug 2006
Rookie Year: 2007
Location: Santa Barbara, CA
Posts: 89
rsilverstein has a brilliant futurersilverstein has a brilliant futurersilverstein has a brilliant futurersilverstein has a brilliant futurersilverstein has a brilliant futurersilverstein has a brilliant futurersilverstein has a brilliant futurersilverstein has a brilliant futurersilverstein has a brilliant futurersilverstein has a brilliant futurersilverstein has a brilliant future
Send a message via AIM to rsilverstein
Re: Offensive Power Rankings for 2008

Great data... you can definitely see an improvement among teams over the weeks.
__________________
Team 1717
9x Regional Winner
2x Division Finalist
16x Engineering/Design Awards

www.dpengineering.org
Reply With Quote
  #150   Spotlight this post!  
Unread 08-04-2008, 14:12
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,045
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
Re: Offensive Power Rankings for 2008

Here's a theoretical and completely meaningless divisional breakdown for Championships based solely on Bongle's final OPR's and the current 339-team list (sort all teams by OPR, then go (A, C, G, N), (A, C, G, N), etc.

Even if FIRST went with this off the wall sorting system, the addition of the final few teams would skew the arrangement.

Code:
 
330   Newton
67   Newton
103   Newton
469   Newton
1024   Newton
368   Newton
1625   Newton
93   Newton
16   Newton
1629   Newton
71   Newton
1156   Newton
45   Newton
703   Newton
1592   Newton
237   Newton
501   Newton
816   Newton
100   Newton
176   Newton
222   Newton
384   Newton
1350   Newton
364   Newton
2165   Newton
316   Newton
1   Newton
1528   Newton
1598   Newton
488   Newton
1756   Newton
2455   Newton
461   Newton
1983   Newton
116   Newton
57   Newton
503   Newton
177   Newton
107   Newton
418   Newton
312   Newton
401   Newton
2483   Newton
801   Newton
2520   Newton
1939   Newton
476   Newton
1023   Newton
499   Newton
1646   Newton
2340   Newton
120   Newton
1143   Newton
1296   Newton
701   Newton
2352   Newton
1594   Newton
302   Newton
2454   Newton
2557   Newton
2591   Newton
207   Newton
1212   Newton
1732   Newton
2237   Newton
2023   Newton
2038   Newton
2556   Newton
2410   Newton
2424   Newton
2575   Newton
1071   Newton
2354   Newton
433   Newton
228   Newton
900   Newton
599   Newton
1599   Newton
1266   Newton
752   Newton
296   Newton
677   Newton
1595   Newton
1795   Newton
233   Galileo
525   Galileo
40   Galileo
20   Galileo
1717   Galileo
968   Galileo
365   Galileo
47   Galileo
1806   Galileo
195   Galileo
27   Galileo
1065   Galileo
1574   Galileo
111   Galileo
357   Galileo
70   Galileo
2337   Galileo
179   Galileo
234   Galileo
2046   Galileo
692   Galileo
358   Galileo
1989   Galileo
2024   Galileo
2604   Galileo
292   Galileo
435   Galileo
2468   Galileo
201   Galileo
932   Galileo
1261   Galileo
1429   Galileo
1388   Galileo
236   Galileo
231   Galileo
1474   Galileo
2624   Galileo
612   Galileo
192   Galileo
2122   Galileo
180   Galileo
2638   Galileo
1902   Galileo
1503   Galileo
1094   Galileo
2518   Galileo
2335   Galileo
2668   Galileo
2344   Galileo
329   Galileo
2377   Galileo
1138   Galileo
2474   Galileo
597   Galileo
1165   Galileo
1014   Galileo
115   Galileo
1013   Galileo
1566   Galileo
1533   Galileo
1366   Galileo
548   Galileo
1323   Galileo
547   Galileo
527   Galileo
462   Galileo
122   Galileo
1868   Galileo
340   Galileo
2053   Galileo
75   Galileo
1254   Galileo
269   Galileo
457   Galileo
1033   Galileo
1398   Galileo
2543   Galileo
1739   Galileo
1577   Galileo
1522   Galileo
922   Galileo
86   Galileo
2621   Galileo
422   Galileo
509   Galileo
2056   Curie
39   Curie
1124   Curie
191   Curie
141   Curie
1126   Curie
2171   Curie
254   Curie
1477   Curie
343   Curie
41   Curie
148   Curie
121   Curie
1662   Curie
768   Curie
1540   Curie
2016   Curie
2062   Curie
341   Curie
2549   Curie
2590   Curie
555   Curie
88   Curie
386   Curie
716   Curie
375   Curie
573   Curie
288   Curie
1319   Curie
1802   Curie
2472   Curie
66   Curie
949   Curie
48   Curie
68   Curie
84   Curie
155   Curie
108   Curie
2081   Curie
65   Curie
271   Curie
1504   Curie
2609   Curie
2550   Curie
812   Curie
686   Curie
1357   Curie
425   Curie
294   Curie
1318   Curie
1699   Curie
2342   Curie
1860   Curie
1245   Curie
1305   Curie
2415   Curie
1108   Curie
1386   Curie
135   Curie
128   Curie
2564   Curie
1747   Curie
8   Curie
2614   Curie
2599   Curie
1538   Curie
587   Curie
1758   Curie
1311   Curie
1834   Curie
159   Curie
1102   Curie
2115   Curie
1941   Curie
1547   Curie
2338   Curie
226   Curie
858   Curie
4   Curie
1523   Curie
303   Curie
2429   Curie
5   Curie
203   Curie
468   Curie
1114   Archimedes
987   Archimedes
217   Archimedes
175   Archimedes
79   Archimedes
1086   Archimedes
494   Archimedes
25   Archimedes
1251   Archimedes
33   Archimedes
1418   Archimedes
171   Archimedes
126   Archimedes
1218   Archimedes
326   Archimedes
118   Archimedes
337   Archimedes
395   Archimedes
1511   Archimedes
2487   Archimedes
359   Archimedes
291   Archimedes
397   Archimedes
694   Archimedes
1736   Archimedes
1649   Archimedes
1279   Archimedes
1746   Archimedes
1987   Archimedes
1690   Archimedes
894   Archimedes
1089   Archimedes
138   Archimedes
223   Archimedes
2214   Archimedes
842   Archimedes
1816   Archimedes
1025   Archimedes
60   Archimedes
11   Archimedes
830   Archimedes
1450   Archimedes
134   Archimedes
2449   Archimedes
102   Archimedes
85   Archimedes
980   Archimedes
2630   Archimedes
832   Archimedes
486   Archimedes
2166   Archimedes
2048   Archimedes
2437   Archimedes
440   Archimedes
1714   Archimedes
173   Archimedes
1038   Archimedes
1676   Archimedes
190   Archimedes
903   Archimedes
1727   Archimedes
1379   Archimedes
614   Archimedes
1885   Archimedes
399   Archimedes
49   Archimedes
322   Archimedes
2423   Archimedes
610   Archimedes
2430   Archimedes
178   Archimedes
224   Archimedes
1502   Archimedes
839   Archimedes
1127   Archimedes
967   Archimedes
87   Archimedes
2629   Archimedes
151   Archimedes
714   Archimedes
241   Archimedes
604   Archimedes
2041   Archimedes
868   Archimedes
1576   Archimedes
__________________

Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
2006 Offensive Power Ratings sw293 General Forum 16 10-05-2006 17:04
Offense/Defense rankings for 1043 teams Bongle General Forum 21 06-04-2006 19:58
best offensive play thatphotochick General Forum 6 04-04-2006 20:35
Defensive or offensive? (to you) Andrew Blair Rules/Strategy 17 23-03-2005 15:09
Best Offensive Round archiver 2000 10 23-06-2002 22:37


All times are GMT -5. The time now is 14:31.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi