Code templates and Student-Centered Policy discussion

Ok, so it’s pretty clear that the answer to the Q&A question has made things even more unclear.

I’d like to suggest that someone write a follow on question that asks about specific examples:

  1. Knowledge level needed for something simple like a PID library
  2. Knowledge level needed for something complex like LVGL
  3. Knowledge level needed by using a library that uses LVGL (ie if it’s libraries all the way down, how far down)
  4. What about VexCode routines, ie how much detail to use the IMU
  5. If using a different library for a sensor like the IMU, how much detail
  6. For sensors that have had code released (GPS), how much detail.
  7. How do you expect referees / judges to be able to decide the skill level match? Will there be a tool / rubric to follow? Will EPs need to add a software expert (software inspector) to be able to make these judgements?
  8. … 22) create your own.

Flesh the wording out so you are detailed enough to get a response.

Software has been an issue with RECF for years, here is your chance to get it nailed down in a complete fashion. Maybe this is a good thing for both the Student Advisory Board and the Event Partner Advisory board to work on.

I’d rather see a more detailed response from @VEX_GDC so the torches / pitchfork case that @AlecMiller is predicting does not happen.

If you’re asking about custom Vexcode commands might as well ask about custom pros commands too.

(Disclaimer - this post is my own, not an official GDC stance or statement, take it with similar grains of salt as if I was speaking informally a summit or webinar or something.)

I could summarize most of my thoughts about this thread into one phrase: “don’t overthink it”.

This thread is being largely driven by professional software engineers, or educators with a university-level understanding of computer science. This cross-section is not representative of the average VEX competitor / educator, and is therefore not really the main audience we need to have in mind when writing Q&A answers.

The Student-Centered Policy is the formal attempt at getting it nailed down. It is impossible to overstate how much energy has been spent between GDC, RECF, and VEX staff on this subject since the mid-2010’s. There are always opportunities to simplify verbiage or clarify things, but the core philosophy is unlikely to change any time soon.

I guarantee that if what you’re suggesting were to actually happen at an event, every single team involved would be emailing their RECF support rep immediately to complain. The Q&A doesn’t exist in a vacuum. It exists alongside the network of EP’s and RECF staff that train volunteers and enforce best practices, a network which is surprisingly good at self-regulating to catch outliers.

Come on - unless you planned to go remove LVGL from your team’s robot upon reading the Q&A response, then you know that’s not what it means.

If someone is trying to decide whether one library is legal while another one isn’t, or whether a PID loop becomes illegal once you add “I”, then you are already further ahead than the real reasons for these rules.

Here are some examples from over the years. These are very real, I’m sure James could tell you a dozen more.

  • 1000’s of lines of code (including many loops); students could not explain why a loop would be used
  • Multiple perfectly consistent, complex auton modes; students could not answer the question, “which section would you modify to make it turn left instead of right”
  • Top-10-in-the-world Skills score; students did not know where the “download” button was

These are while the students are presenting their own robot’s code. It’s easy to read too far into these rules if you assume that we’re already past this fundamental stage of “students code their own robot”. However, I assure you, we are not. (but it does get better every year).

tl;dr - just re-read this part of @jpearman’s post, it sums it up pretty perfectly:

To be very clear, based on my reading of the rules, it was my belief that LVGL or any library a team could not implement themselves coming from a source other than VEX was illegal. And so I would advise any team to avoid using it, because there’s a risk that the rules could be read in that way, because that’s exactly how I read the rules. If the way I was reading the rules differs from the way I’m meant to be reading them, I’m thrilled that that isn’t what’s intended by the rules, because obviously I don’t think the rules should be that way, that was just how I was reading them.

All of the examples you give are of things that should, of course, be illegal. 100% agreement there. I just really don’t like the phrase “program on a level equivalent to” to seemingly refer to the content of 3rd party libraries, because I think that can be read in a very very expansive way that means teams can’t use a library if they couldn’t write the library themselves from scratch, even if they do something transformative with the library on their own and demonstrate a solid understanding of why the library is used and how it’s being used to achieve their goals in an interview.

I guess the answer I’m really trying to get is if “a team uses a PID library and doesn’t totally understand the math of PID and couldn’t implement PID themselves, but they do understand that PID is a thing that results in a motor smoothly going to a position, and they can explain the steps they followed to tune their PID loop” is an example of something that you’re trying to make illegal, which it seems like you’re not.

To add - the behavior usually stems from adult-driven teams, vs student-centered and that is what is being addressed. For MS VRC this is typically the challenge.

I do think we are heading in the right direction with Student-Centered, and the reporting process to educate teams/organizations, sooner rather than later, in the process.

Yes, these are all behaviors we would like to reduce/eliminate. That said, there are other, non-student-centric behaviors where adults seek advantage for their teams by trying to disqualify other teams on rules technicalities…recall last year’s String Gate issues.

@Grant_Cox - I appreciate you hopping into this thread and responding as you have. I think there’s largely alignment on the big picture behaviors among all participants in this thread, and, as you put the intent:

Where I think there is disagreement is how that intent has been conveyed. If there are at least 3 of us on the Forums who interpreted this wording as the most strict interpretation, then surely there will be other EPs/Refs/Parents/Coaches/Mentors who will as well, especially if they have some “motivation” to do so. And to the extent that we believe that to be the case, there are probably mentors such as @AlecMiller , @sazrocks and myself who would (absent this post) probably have advised our teams to remove things like LVGL.

@Grant_Cox 's response really cleared up the intent a lot for me. I was worried that the intent was to cut the legs out from underneath teams trying to take advantage of generally available open source software.

My new interpretation and how I wish the rule was worded is

Any software running on the robot must be either:

  • Publicly available to all competitors, such as VEX or its partners provided software or community libraries
  • Written by the students on the team

Students on the team are expected to be able to explain all the code they wrote and the desired behavior of all the publicly available library functions they use

I somewhat agree, but I still don’t think we completely understand the position on the community libraries that lie between the large open source projects such as LVGL (as we seem to have zeroed in on that) and the trivial 50 line PID loop code. I’ve avoided so far using anyone’s template as an example, but I guess at this point I need to single out one community library as an example for discussion.

Ok, so lemlib

I’m using this not only as an example of a typical library trying to provide odometry, but also as an example of a well written and presented project, this is how templates should be done. The source code is well commented using Doxygen style function headers and there is sufficient additional documentation that anyone using this library should have a good understanding of how it works with only perhaps a few hours of study.

Using the library, after creating the necessary motor instances and drivetrain class, can then allow using some quite high level functions, for example

chassis.moveTo(20, 0, 4000);

which is telling the robot to move to a location, this is the documentation from the chassis.hpp header

/**
 * @brief Move the chassis towards the target point
 *
 * The PID logging ids are "angularPID" and "lateralPID"
 *
 * @param x x location
 * @param y y location
 * @param timeout longest time the robot can spend moving
 * @param maxSpeed the maximum speed the robot can move at
 * @param log whether the chassis should log the turnTo function. false by default
 */
void moveTo(float x, float y, int timeout, float maxSpeed = 200, bool log = false);

almost perfect, I would like to see some units (is it 20 inches or mm, is timeout in mS or seconds etc) but it wouldn’t take much study of the source to understand what they are.

Unlike LVGL, I would expect anyone using this library to have a much more detailed knowledge of how it’s achieving moving a robot to a specified position or following a path. The “Program at a level equivalent to” does I believe in this case, mean being able to understand and duplicate some of this libraries functionality.

all personal opinion of course, I’m not on the GDC :slight_smile:

I pretty much never touch the forums anymore because 1984 but I feel like chiming in.

Back in Tipping Point, I was a new programmer who didn’t really know much about C++. I did try to get some experience, but a lot of things my org basically never heard of. You can’t learn what you don’t know even exists. I found out what PID was because 7121E was doing it on their bot for worlds, and Pure Pursuit almost midway through Spin Up. However, I never stopped wanting to learn. Not everyone’s like me or Sylvie or Liam though, who are making our own libraries to learn about everything we can. Some people just don’t care about programming, and that’s fine in my opinion. I try to instill in the new members the idea of learning how everything works and doing it yourself, but realistically that’s just advice. Almost every team that made it to dome last year was using JAR, LemLib, Sylib, EZ template, or ARMS. It’d be stupid to say that because they didn’t know how the math behind PID works they should now all of a sudden be disqualified. They worked extremely hard (unless they’re mentorbuilt :flushed:) to get to where they are.

Like Grant said, basically everyone in here is either an actual software developer or an experienced programmer. We know what what we like to do: write cool programs. But why does the RECF have the right to define someone else’s education like that? VEX is mainly a building and documentation competition. Programming is VERY MUCH secondary. Not every team has a grandiose goal of making their own custom Pure Pursuit algorithm to fit their needs. Hence, let people use libraries. No foul play is afoot, its just a time save.

and we miss you.

I remember well your questions, failures and success. You were investing huge amounts of time learning, in many ways you are the type of student/team that the student centered policy is trying to protect. A student that programs their own robot through hard work and perseverance. But what if you then were beaten by a team using a library written by some unknown author, perhaps open source, that just “made the robot work” with almost no effort, how would you feel ?

Hey All,

I thought I might chime in with a different perspective in terms of template software development regardless of the legality of the competition usage of them. Honestly I thought that this was a dead topic given that similar discussion surrounding the legality of Okapilib back a few years ago caused quite a stir, but I’m glad that we have healthy discussion surrounding the topic regardless :slight_smile: .

The ability to publish and release templates in the VEX Community in my opinion has had a net positive impact for the community. It encourages those on the higher end of competition seeking to do something more to develop both entrepreneurial skills of distributing/advertising the template and even coordinating team efforts behind the software development of the template as one might need to do running a startup/small scale business. These skills translate extremely well into professional careers as students participating in template development and make their code open source create a Github history years long that are a lot of the times what software managers look at as proof that somebody is competent when being hired for a job.

A good example of this collaborative multi-team effort is EZTemplate, which although headed by somebody college aged has had a steady stream of high school contributors when necessary due to its wide adaptation.

On the other end of competition with those who are template users, while another concern is copy paste PID code I also think there’s a degree of exposure that some of these concepts (PID, odometry, other advanced algorithms/code features) would never get if it weren’t for templates and their advertising. Being able to configure some of these features as well as tune them despite not writing some parts of the algorithms is sometimes half the battle and allowing young programmers to gain exposure to that is very beneficial considering that in industry, most of these robot movements and other algorithms are also packaged into libraries that can be installed on whatever hardware the robot is running on and that there are many jobs out there that need folks that know how to deal with the intricacies of tuning and dealing with real world robots.

I also encourage the GDC to review the wording in the rule discussed with consideration that community projects and templates are a cornerstone to programming in VEX, and has its own subculture that encourages cooperation and pushing the limits of programming in VEX. Currently, the rules have just enough leeway where an EP could completely outlaw certain built in PROS features (think LVGL, .brake() being a relatively recent thing not present in the cortex era) if they were really hellbent on doing so (and probably angering the entire venue in the process).

This is exactly the scenario that goes through my mind every time I start developing my own algorithms. Not sure if that was a rhetorical question, but I would feel bad. :laughing:

I worry that there is some part of me that is only chasing these ‘grandiose’ goals because of my pride. Will I end up hurting my team by insisting to chase these goals? Or does it matter?

I cant speak for everyone with 'grandiose goals', but...

I almost feel like taking the existence of all of these ‘templates’ and ‘libraries’ people have made as a challenge. A challenge to further my own skills, abilities and understanding of advanced physics, programming, and at this point psychological concepts.

(apply an appropriate amount of humor to that last bit)

clever.

I have to say, developing LemLib is way different from what I imagined it would be. I thought it would just be tidying up my code and posting it online, but the community had other ideas.

I get feedback on my code which I use to improve it, something I never would have had if I just kept it all private. People share their ideas with me, and some of them are truly brilliant. I also get to collaborate with people on other projects, for example Jerry Lum’s path planner: GitHub - Jerrylum/path.jerryio: The best path editor in VRC for designing skills routes and generating path files.

Templates encourage the sharing of knowledge, something thats unfortunately rare in competitions. With this, resources for learning will improve. Restricting the use of templates restricts the growth of community knowledge.

Lastly, there are 2 things I want to point out:

  1. You can’t use a tool effectively if you don’t understand its strengths and weaknesses
  2. If you want to do better than the mainstream, you need to do something different from the mainstream. The top teams in the world will still use mostly their own code.

Thanks for the W compliment.

This though is every south florida comp ever. Out of the competitive teams in south florida in SU that i personally know, about 6/8 used either EZ template or ARMS. Both kapri and tyler were using it every time they clapped us. Doesn’t mean anything to me: i personally believe they were just using their resources. I could have very easily just downloaded EZ template myself and done the same things, but since i was a programmer, i wanted to just learn it myself. They had different goals and different areas they wanted to grow in, thats all.

Personally, just knowing there is something/someone whose better was ample motivation for me. I didnt use any libraries or templates out of sheer stubbornness

I would have an easier time continuing to contribute to this forum if the moderation policies weren’t set to manual approval for each post. It really really hampers communication here.

While yes, it does slow down conversations, if you have something helpful to say, you can count on it being approved. I think the mods deserve a lot of credit for making the forums safe, kid-friendly, and useful. Have a nice day!

It always was. As far as I know there were no reports of shady conduct or misuse on this forum.

There were. 'nuff said.