Home > Backend Development > PHP Tutorial > I'm looking for a mathematical model. Can anyone with good math knowledge help me?

I'm looking for a mathematical model. Can anyone with good math knowledge help me?

WBOY
Release: 2016-07-06 13:53:25
Original
1079 people have browsed it

There are many questions and answers, each question has these attributes
id, content, ..., difficulty (difficulty), total_times (number of answers), correct_times (number of correct times)
I want to calculate the number of answers based on the number of answers and Assign difficulty to each question with the correct number of times

There are many other users, each user has attributes
id, answer_total_times (number of answers to questions), answer_correct_times (number of correct answers), difficulity (corresponding to difficulty level)...
I want to calculate the total number of answers based on the user and the correct number of times are used to calculate the user difficulty level.

Then select the questions corresponding to the difficulty level according to the user’s difficulty level.

The difficulty level of the current question is

<code>$difficulty = ceil((1-($quiz->correct_times / $quiz->total_times))*10);</code>
Copy after login
Copy after login

User’s use

<code>$user_difficulty = ceil(($user->answer_correct_times / $user->answer_total_times) * 10);</code>
Copy after login
Copy after login

I feel very frustrated. If anyone familiar with the design can give me a tip, thank you.

Supplement:
The difficulty of the initial question is 1, and the difficulty of the initial user is 1. The difficulty coefficient is reset only after the question has been done 1000 times, and the difficulty coefficient is set only after the user has done 100 questions.
Difficulty value is changed (corrected) regularly.

Reply content:

There are many questions and answers, each question has these attributes
id, content, ..., difficulty (difficulty), total_times (number of answers), correct_times (number of correct times)
I want to calculate the number of answers based on the number of answers and Assign difficulty to each question with the correct number of times

There are many other users, each user has attributes
id, answer_total_times (number of answers to questions), answer_correct_times (number of correct answers), difficulity (corresponding to difficulty level)...
I want to calculate the total number of answers based on the user and the correct number of times are used to calculate the user difficulty level.

Then select the questions corresponding to the difficulty level according to the user’s difficulty level.

The difficulty level of the current question is

<code>$difficulty = ceil((1-($quiz->correct_times / $quiz->total_times))*10);</code>
Copy after login
Copy after login

User’s use

<code>$user_difficulty = ceil(($user->answer_correct_times / $user->answer_total_times) * 10);</code>
Copy after login
Copy after login

I feel very frustrated. If anyone familiar with the design can give me a tip, thank you.

Supplement:
The difficulty of the initial question is 1, and the difficulty of the initial user is 1. The difficulty coefficient is reset only after the question has been done 1000 times, and the difficulty coefficient is set only after the user has done 100 questions.
Difficulty value is changed (corrected) regularly.

There is a problem with the rules, and the designers are not awake. The simplest question is if you do a question 1,000 times and no one gets it right, what is the difficulty level? If all 1,000 people get it right, what is the difficulty level?

In fact, the number of people answering the question can only reflect the difficulty from one aspect. The actual difficulty should be specified by the person who set the question. If you don’t know the difficulty of the question, it means that the person who set the question is unprofessional.

Have you rehearsed this rule? I am a user and I want to get high scores, so I only do difficult questions. After doing it, I might share it so that others know the answer. Then I would like it even more if I cheated and got a high score. As a result, the originally high-difficulty questions became low-difficulty when they were re-evaluated. As a result, my score was affected by this and my score became lower. . As a result, there will be no difficult problems in the system, and users will naturally not be able to take high difficulty levels. This result is obviously not in line with your expectations. Also consider the use of the algorithm.

Conclusion: Don’t think about business logic independently from reality. Because business logic is used by people, since it has an impact on people, people must find ways to avoid the impact, or make the impact as beneficial as possible. If all participants have no benefits or all have the same benefits, there is no competition mechanism to attract them. people?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template