Velle-log / hs-api

0 stars 1 forks source link

Design functional architecture of `Compete` module. #61

Open Samy-33 opened 5 years ago

sk364 commented 5 years ago

List down all the major features (in order of their complexities).

Samy-33 commented 5 years ago

Features:

sk364 commented 5 years ago

Starting with Challenge/Contest.

Challenge (as visible on HackerEarth Challenge: Missing Challenge):

Now, there are prizes, registered users, shortlisted teams, FAQs, Judges, Timeline & Schedule and Discussion.

Samy-33 commented 5 years ago

Looks good, @sk364.
For Problem:

sk364 commented 5 years ago

What kind of challenges there can be? Differences between a challenge and a contest?

We can also store the difficulty of the problem. What's the unpickled value of data?

sk364 commented 5 years ago

For Submission:

Samy-33 commented 5 years ago

What kind of challenges there can be?

Kind of challenges:

Challenge and contest are same.

We can also store the difficulty of the problem.

We'll have a separate table which will map the percentage of skill being measured in a problem and we can store difficulty according to each skill.

What's the unpickled value of data?

There will be different kind of problems. So instead of having unused columns in a table we'll have separate class for each problem-type that will contain all the business logic and related information of that kind of problem. We can store pickled value of this class object in data field.

sk364 commented 5 years ago

Sounds good. So, we have got Challenge, Problem, Submission as the main models and there will be models related to these based on the feature requirements.

Let me know your thoughts on Scoring/Rating criteria & Skill Map.

sk364 commented 5 years ago

For Team:

sk364 commented 5 years ago

Can a boolean be added to Problem model called is_practice, which basically marks the problem for the Practice Arena?

sk364 commented 5 years ago

This is what I am thinking about the Arena (one-on-one competition).

It will create a match for 2 players based on their skill levels to solve a common problem within a certain amount of time.

Only the first one to solve will get the points and the match will be ended as soon as that happens.

Can there be more than 2 players? Can there be more than one common problem? Can the loser be allowed to solve the problem, if the time is remaining to get points (definitely lesser than the winner)?

Samy-33 commented 5 years ago

About the rating-criteria: http://codeforces.com/blog/entry/102

Skill Map

We'll have a table storing skills. Then each problem will be examined for how much a particular skill is being tested in that problem, accordingly a number will be assigned int Problem-Skill map table. And after this all is done, final difficulty will be computed according to those assigned numbers and other variables.

Samy-33 commented 5 years ago

For the Team model, we need to keep track of who the current admin is.

Can a boolean be added to Problem model called is_practice, which basically marks the problem for the Practice Arena?

Right. Added.

Samy-33 commented 5 years ago

Arena

Keeping it generic would be a better option, we can make it team as well as non-team type match.
Let us make this many-2-many arena. There is nothing like this available on any platform. Yet.

Multiple people solving the same problem and competing on speed, accuracy and efficiency.

Samy-33 commented 5 years ago

@sk364 I have one more feature in mind for this. Voice chat for discussion. After the contest is over. We'll see how many users are available assign them in multiple rooms so that they can connect and discuss the problems.

sk364 commented 5 years ago

Yes, I was thinking of assigning an admin of the team. Can there be more than one?

Even if there is only one, we will need to create a via model TeamMember with user_id, team_id and is_admin. This will support multiple admins as well.

sk364 commented 5 years ago

How difficult, based on time and effort both, will you say is the Skill Map feature?

sk364 commented 5 years ago

Video Discussion is an awesome idea. Write these gems down, for future. 👍

sk364 commented 5 years ago

Arena seems good. I think we can start off with 1 vs 1 where 1 can either be an individual/team.

There are a lot of possibilities on how to structure this for a team. One way that I am thinking is this that each member will get one problem, even if the member count of one team is not equal to the other. Other members can only see the problems assinged to other teammates, but can't submit.

What do you think?

Samy-33 commented 5 years ago

How difficult, based on time and effort both, will you say is the Skill Map feature?

Skill Map is more of a research topic. For now we can allow problem creators/moderators/admins to manually add skills required for to solve a particular problem and the difficulty level of the problem for each skill. Moving forward with this approach shouldn't take much time. It is basically SkillMap and Skill models, CRUD views for them and a way to reduce the difficulty level of each skill to overall difficulty of the problem.

Samy-33 commented 5 years ago

There are a lot of possibilities on how to structure this for a team. One way that I am thinking is this that each member will get one problem...

This will be a biased game if the number of members in different teams is different. If the winning criteria for this kind of challenge are classical judging criteria like accuracy, efficiency and time taken etc then it will not be the fair game.

We'll need to find another judging criteria for this type of arena.

This problem will anyway be there if there are different number of members in different teams. But if we only allow single problem per team, then it is user's responsibility to participate in arena with n number of members.

sk364 commented 5 years ago

It's just that the time to "match" one team with another will increase. But, to have a single problem makes sense.

pranjulps3 commented 5 years ago

I have an image of how it will look in mind from following this discussion and adding some ideas of my own. Please mind the gaming references in the ideas added. User selects a type of contest (Solo, Duo, Squad if we want to have fixed length teams) and will either

Once the team is formed the Opponent matching service will run and a arena contest instance will be initiated between the matched opponents. Along with the instantiation of the arena contest instance the players of both teams will be joined to a Audio channel and chat room for private(within team) and public(between teams) text chat (We're totally allowing sledging between teams).


Now lets run down the contest. As per my understanding we're allowing 1 question per team to be solved in a given amount of time. So there can be a shared or separate code editor for the team (yet to be decided). I feel ICPC standard might be good but do suggest better alternative to this. The scoring is another part I think we're left figuring out completely.

Samy-33 commented 5 years ago

I like the ideas.

I feel ICPC standard might be good

ICPC allows one screen per team. If we go along with ICPC way then having Voice Chat among team-members doesn't make sense. If we allow one screen per team member, we have only one question. Multiple people solving same question on different screen is not what should happen.

To tackle this problem, we can allow only one person to have write access to the editor and other team members will have read-only access. Member having write access can transfer write access to other team member during the challenge.


Question: What is the purpose of allowing cross team voice communication during a challenge?

pranjulps3 commented 5 years ago

To tackle this problem, we can allow only one person to have write access to the editor and other team members will have read-only access. Member having write access can transfer write access to other team member during the challenge.

I was thinking of the same thing.

What is the purpose of allowing cross team voice communication during a challenge?

Voice chat is only for the team. There will be a cross team text chat room. I see I haven't specified it in the text. The text chat can just spice the competition a bit.

pranjulps3 commented 5 years ago

Member having write access can transfer write access to other team member during the challenge.

Additionally for this we'll need to create another channel to broadcast the editor changes. It's something we'll need to figure out.

Samy-33 commented 5 years ago

The text chat can just spice the competition a bit.

I don't see how that's useful.

Additionally for this we'll need to create another channel to broadcast the editor changes. It's something we'll need to figure out.

That's an implementation problem. We might use channels or just another node-js server to handle real-time communication.

pranjulps3 commented 5 years ago

I don't see how that's useful.

I think it would be cool to have in case of any issue or any general conversations. Not a must have for sure.

sk364 commented 5 years ago

Text chat room for cross team communication seems like a fun idea, but an overkill for a match that wont last for more than 10 minutes where each team member ( I am hoping ) is focused on the problem. But, at the same time, it increases the complexity of the problem, which helps bring randomness into these matches. Additionally, there will be at least one new role for the team members: The Sledger.