Using Preferences to Solve Student–Class Allocation Problem

Using Preferences to Solve Student–Class
Allocation Problem
Juan I. Cano1,2 , Luis Sánchez2 , David Camacho1 , Estrella Pulido1 ,
and Eloy Anguiano1,2
1
Computer Science Department
Centro de Referencia Linux UAM-IBM
Universidad Autónoma de Madrid C/ Francisco Tomás y Valiente no 11 28049,
Madrid, Spain
[email protected], [email protected], [email protected],
[email protected], [email protected]
2
Abstract. Resource allocation is a form of Constraint Satisfaction Problem (CSP) in which a set of resources must be assigned to a set of agents.
Multiagent Resource Allocation (MARA) makes possible solving CSP using qualitative parameters as, for example, reduce idle time in scheduling
or preferences over the set of resources to be allocated. In this paper, we
are going to use a MARA approach to find a solution to the studentclass allocation problem, where each class has a number of seats, each
student has his preferences over the schedule and the institution requests
a uniform distribution of the students in classes and some other rules.
1
Introduction
The problem of assigning a class schedule to a set of students is not a trivial
problem. Each student has preferences over the possible classes depending on
the time each class is given or the teacher that gives it, for example. This kind
of problem belongs to the set of Resource Allocation Problems, Educational
Resource Allocation (ERA) if we attend to the type of resource, wich in turn
belongs to the Constraint Satisfaction Problems (CSP) class.
Traditionally, CSP are solved by search algorithms as for example backtracking, constraint propagation and local search [1]. The problem with this approach
is that the solution given is just feasible and some problems need also to be measured in other terms as in resource allocation, where sometimes other factors as
efficiency or preferences are important[2]. Using a CSP approach we have two
options, adding constraints to the problem or using a second search over the
resultant solutions. The first approach makes the problem harder to solve and
can even make the problem unsolvable, but doesn’t assure that the solution is
near an optimal one. The second approach is even harder because the second
search needs all the possible solutions to give an answer.
Multiagent Resource Allocation (MARA) presents a different approach to
this problem. The problem is represented by a set of agents that participates,
collaborating or competing, in the shaping of the solution[3][4]. Each of this
H. Yin and E. Corchado (Eds.): IDEAL 2009, LNCS 5788, pp. 626–632, 2009.
c Springer-Verlag Berlin Heidelberg 2009
Using Preferences to Solve Student–Class Allocation Problem
627
agents can have its own preferences and can behave in a different way than
the others, which makes easier the allocation problem when there are different
types of resources or entities to assign them. This approach makes this family of
problems more intuitive and the solutions are oriented to an optimal [5]. In this
work, the agents will have the same behaviour with different preferences and
each one will represent a student.
2
Analisys of the Problem
In this problem there are two different entities, the student and the laboratory,
or class, group. Each student can be inscribed in many courses and for each
course he (or she) has to have one group assigned. There can be many groups
for each course, but a student can only be assigned one. For the rest of the
paper, Resource Sets (RS) will refer to the subjects or courses and Educational
Resources (ER) to the groups.
2.1
Properties and Characteristics
To address correctly the problem, it will be described by a set of properties
and characteristics (resource types, preference representation, social welfare, allocation procedures, complexity, and simulation) from [2], which can be used to
characterize MARA systems and applications.
• Resource Type
– Discrete vs Continuous: The ER are discrete, they cannot be represented
with real numbers nor it can be divided.
– Divisible or not: The ER are not divisible
– Sharable or not: Each ER can be assigned to more than one agent at the
same time, but they have limits (seats/places).
– Static or not: The ERs doesn’t change during the negotiation, they’re
not consumable nor perishable.
– Single–unit vs Multi–unit: Each ER is unique, it can’t be confused with
another ER.
– Resource vs Task: The ER is assigned as a resource, not as a task.
• Preference Representation
– Preference structure: Although our model distinguishes between three
different choices (Preferred (P), Indifferent (I), Forbidden (F)) of a particular educational item, and we could construct an ordinal preference
structure (where P > I > F ), we use an evaluation function that translates the agent preference into an integer which is used later to obtain
a quantitative value, so a cardinal preference structure is the structure
used.
– Quantitative preferences: A utility function is used to map the bundle
of resources assigned to an agent into a quantitative value, which will be
later maximized.
– Ordinal preferences: Not applicable (beyond the scope of this paper).
628
J.I. Cano et al.
• Social Welfare
Our approach is based on Collective Utility Function (CUF) because the
aim is to maximize the average value of individual agent welfares[7]. In the
egalitarian social welfare, the aim is to improve the agent with the lowest
welfare and in the utilitarian social welfare the aim is to improve the sum
of all welfares, whereas in our approach the global state of the whole agent
society by means of the average welfare is the aim of optimisation. Among the
different possibilities (pareto optimality, collective utility function (CUF),
leximin ordering, generalisations, normalised utility or envy–freeness) a CUF
has been selected that defines the utilitarian social welfare as the total sum
of agent cardinal values divided by the total number of agents.
• Allocation Procedures
– Centralized vs Distributed: Our approach is fully distributed, since the
solution is reached by means of a local negotiation amongst agents and
there is not a global perspective of the ERA problem. An aggregation
of individual preferences is used and the agent preferences are used to
assess the quality of the global resource allocation.
– Auction protocols: No auction algorithm is considered.
– Negotiation protocols: A simplified version of the Concurrent Contract–
Net Protocol (CCNP) has been implemented, where each agent can act
as a manager and a bidder in the simulation step[6].
– Convergence properties: Our negotiation algorithm needs a multilateral
deal, where any interested agent in a particular educational item can
negotiate with the manager (in our approach the agent who is trying to
obtain a specific allocation).
• Complexity Analysis of the models and assumptions, or the computational
vs. communication complexity, used in our approach is out of the scope of
this work.
• Simulation A Multi–Agent Simulation Toolkit (MASON) has been used to
deploy and test our proposed solution [8][9].
2.2
Happiness
As mentioned before, some problems requires the solution to be measured in
terms other than feasible–not feasible. In this case, there are two considerations
to take care of: each student has preferences over the ER to be assigned and
the RS should have its ER balanced. The goal is to find an assignment that
for each student has one ER for each RS inscribed, maximizing the number of
“preferred” ER, and for each RS all the ER should have a number of students
near the mean of the RS.
For this purpose, we define the student happiness as some function on the
preferences and the occupation of each ER he (or she) has assigned up to the
moment. The student’s preferences are limited to three values, “Preferred” (P),
“Indifferent” (I), and “Forbidden” (F), which are assigned the values 5, 3 and 1
respectively. The values are taken so that P > I > F and P > I + F . Equation
1 presents a simplified version of the function.
Using Preferences to Solve Student–Class Allocation Problem
n
H(ai ) =
j=1 (f1 (RSj (i))
629
+ f2 (q, RSj (i)))
(1)
n
In this function, ai represents the ith agent, RSj (i) represents the ER of the
jth RS the student is assigned to, n is the total number of inscribed RS, f1 is
a function that maps from P, I, F to their integral values and f2 is a function
of the occupation (q) of the assigned ER. As can be seen, H(ai ) is the mean
happiness.
Another important factor is that, in this case, is that each RS is associated
with a year. Each student can have RS from different years, but the University
policy requires that each student can assist to the last year classes. This means
that the system must assure that, if possible, no F is being assigned to last year
RS. This is modeled giving more weight to the last year RS than the rest.
2.3
Negotiation
As explained earlier, each ER has a limited number of seats. This means that at
some point no more students can occupy a selected ER. While this is correct, it
can make the system stop at a position that is no optimal. For example, there’s
an RS that has three ER, RS = ER1, ER2, ER3. The preferences for one
student is S1 = P, P, F , meaning that it “prefers” ER1 or ER2 while he (or
she) is indiferent about ER3. Another agent has as preferences S2 = P, I, I. If
ER1 is complete and the first student is assigned to it while the second is assigned
to ER2, the solution is not optimal. There should be a way to let students swap
their ER.
The negotiation process proposed is simple. If one student wants to enter in
a full ER, he looks for the ER he is currently assigned to that doesn’t decrease
his happiness and offer them to the students in the ER he wants to enter. The
students in that ER evaluates their proposal and in case they improve, or at
least mantains, their happiness they accept the swap. This way, the situation
afore described is solved.
3
3.1
Experimental Results
Datasets
To test this solution 8 datasets were created, each one representing a different situation. The information about courses and enrolled students per course
are based on data collected from the Universidad Autónoma de Madrid. This
information is shown in the following two tables.
Table 1 shows the distribution of students in labs per course. First year students can only be assigned first year lab session, there are 2 courses with labs
(2 RS) and around 8 to 10 different groups (ER) for each course. Second year
students can have up to 3 courses of the second year and 2 courses of the first
year, but the case of having 5 courses is very rare and it’s been removed. The
number of courses most common for the second year students is three, having
630
J.I. Cano et al.
Table 1. Distribution of labs by course
Year No. course/labs Distribution (%)
1st
2
100
2nd
2–3–4
20 – 50 –30
3rd
4–5–6
15 – 70 –15
4–5–6
15 – 70 –15
4th
No. labs
8 – 10
10 – 12
10 – 12
10 – 12
Table 2. Distribution of labs for 3rd and 4th year courses
No. enrolled All the same One course from Two courses from Three courses from
courses
year (%) one year back (%) one year back (%) one year back (%)
4
20
60
20
0
5
10
40
50
0
6
5
40
40
15
Table 3. Student datasets
Data Set Students Preferred groups (P) Forbidden groups (F)
Test
1000
100%
0%
Ds0
1000
1P/(RS,agent)
0%
Ds1
1000
30%
0%
Ds2
1000
1P/(RS,agent)
20%
Ds3
1000
30%
20%
Ds4
1000
1P/(RS,agent)
50%
Ds5
1000
30%
50%
Ds6
1000
1P/(RS,agent)
70%
Ds7
1000
30%
70%
the frequency of the 50%. Third and fourth year students can have 4, 5 or 6
courses with lab sessions, being 5 the most frequent (70%).
Table 2 shows the frequency of a student having courses from one year back
in the third and fourth year. As can be seen, it’s very common to have 1 or 2
courses from one year back. In those years, the number of courses (RS) with lab
sessions (ER) is 5, so having 6 courses from the same year is very unlikely.
Table 3 shows the 8 datasets used. The first dataset, Test, is used to make sure
that the system is working and that if all students only have preferred groups the
system at least makes a balanced allocation. Ds0 thru Ds7 are random datasets
created using the specified number of P’s and F’s. 1P/(ER,agent) means that
for each RS each agent has only one preferred group.
3.2
Results
The results of testing the system with the previous datasets are shown in table 4.
Even in the worst cases, Ds6 and Ds7, the system gives goods results. Being
the happiness of a student between 0 and 10, all datasets have solutions with
Using Preferences to Solve Student–Class Allocation Problem
631
Table 4. MAS experimental results for datasets considered
Data Mean Happiness
Mean
Distribution P’s I’s F’s
Set Happiness Deviation Distribution Deviation (%) (%) (%)
Test
9.85
0.07
81.5
0,66
100 0
0
Ds0
9.3
0.29
81.3
4.21
85.3 14.7 0
Ds1
9.7
0.14
81.4
0.64
94
6
0
Ds2
9.4
0.24
81.1
4.36
86.9 12.75 0.35
Ds3
9.8
0.12
80.4
2.04
95.8 3.67 0.49
Ds4
9.2
0.33
80.8
6.94
85.7 12.5 1.8
Ds5
9.7
0.19
81.0
0.89
95.5 2.42 2.05
Ds6
9.1
0.43
81.0
5.92
86.0 11.1 2.9
Ds7
9.7
0.29
80.9
0.91
95.8 0 4.2
a happiness over 9 points and ER’s with around the 80% of occupation. The
number of P’s and F’s is also noticable. In the worst cases the number of F’s is
less than 5% and in Ds6, where there’s only 1 P per RS, the system allocated a
lot more I’s than F’s.
4
Conclusion and Future Work
Using agents to solve Resource Allocation Problems can be advantageous. First
of all, if the problem is well modeled it would be easier to understand in terms of
agents. For example, it’s easier to think about an agent motivation than about a
variable making the search backtrack because of no possible allocation. Agents
are to AI what objects are to general programming.
Another advantage of MARA is that it is easily ported to a distributed environment, so for problems that are more complicated than this one or situation
where the problem should be solved continuously it can benefit from parallel
computing.
The results obtained in these simulations are good enough to say that it’s
a good alternative to traditional approaches. Even though there are no exact measures, each solution was calculated in just a few minutes. So MARA
is fast and give good results. To make sure that these results are really good
they should be compared to other systems such as a traditional CSP or a
Distributed CSP (DCSP), but it’s expected that MARA outperforms this approaches.
Acknowledgements
This work has been supported by research projects COMPUBIODIBE (TIN200765989), HADA (TIN2007-64718) and V-LeaF (TIN2008-02729-E/TIN). We also
thank IBM for its support to the Linux Reference Center.
632
J.I. Cano et al.
References
1. Tsang, E.: Foundations of Constraint Satisfaction. Academic Press, London (1993)
2. Chevaleyre, Y., Dunne, P.E., Endriss, U., Lang, J., Lemaı̂tre, M., Maudet, N., Padget, J., Phelps, S., Rodrı́guez-Aguilar, J.A., Sousa, P.: Issues in Multiagent Resource
Allocation (2005)
3. Winstanley, G.: Resource Allocation in Model-Based Planning Systems. In: Proceedings of the IEE Colloquium entitled ”Resource Scheduling for Large-Scale Planning
Systems”, Digest Number 1993/144 (1993)
4. Dasgupta, P., Hoeing, M.: Task Selection in Multi-Agent Swarms using Adaptive
Bid Auctions. In: Proceedings of the First International Conference on Self-Adaptive
and Self-Organizing Systems, July 2007, pp. 307–310. IEEE Computer Society, Los
Alamitos (2007)
5. Shoham, Y., Leyton-Brown, K.: Multiagent Systems: Algorithmic, Game-Theoretic,
and Logical Foundations. Cambridge University Press, Cambridge (2009)
6. Smith, R.G.: The Contract Net Protocol: High-Level Communication and Control
in a Distributed Problem Solver. IEEE Transactions on Computers (1980)
7. Aumann, R., Hart, S.: Handbook of Game Theory with economics applications,
vol. 2. Elsevier, Amsterdam (1994)
8. Luke, S., Cioffi-Revilla, C., Panait, L., Sullivan, K.: MASON: A New Multi-Agent
Simulation Toolkit. In: Proceedings of the 2004 SwarmFest Workshop (2004)
9. Railsback, S.F., Lytinen, S.L., Jackson, S.K.: Agent-based simulation platforms:
review and development recommendations. Simulation 82(9), 609–623 (2006)