Ruby Programming Language Tutor

P

Paul van Tilburg

Hi all,

For a course in university (Intelligent Systems -- AI, neural nets,
expert systems etc.) I and others have to write some kind of intelligent
agent. Inspired by the "tutor" example of the course and our love for
Ruby, we decided (free choice assignment) to write a Ruby Programming
Language Tutor.

Purpose
-------
The tutor's purpose is to learn the student Ruby basics by means of
lessons. A lesson could explain for example the aspects of Integers by
giving the student assignments and give answer to or elaborate on
questions like: Why? How? When? etc.

The tutor gives assignments which the student must complete. Besides
the fact the user must give correct output, not all code that produces
this output will suffice. The student should familiar him/herself with
some of Ruby's best programming practices too.

For example the assignment could be:
Print the numbers 10 till 15, each on a line.

The student could do:
| puts 10, 11, 12, 13, 14, 15
but we would really like him to use:
| (10..15).each { |i| puts i }
and maybe not even
| (10..15).each do |i| puts i end
because it's common style to use { ... } for one-liners.

Note that the agent could decide to allow the first input, because
the student hasn't done the lesson on iteration yet.

Interface
---------
Everything should run in a web browser. The idea is to present
an interface to select lessons (possibly not all order restricted),
show progress and the actual lesson interface.
This interface presents the user with the assignment, a form to type in
his/her code and some buttons for asking Why?, When?, How? or to
request a hint.

Everything said above hasn't crystallised yet and isn't definite at all.
But if some of you know some interesting links, libraries or
documentation pointers, please let me know!
Things we are especially interested in:
* A simple step-for-step tutorial we can use as bases for our lessons
(Pickaxe, Poignant guide are great, but not suited.)
* Ruby style guides (except for the one on RubyGarden).
* Adaptive hypermedia libraries?
* Libraries for investigating the input of the user. Validation by
means of evaluation is necessary, but we also like to investigate
the structure of what the user typed, so the agent can give hints on
how to do it better.

Thanks for the help,

Paul
[/QUOTE]
 
J

James Edward Gray II

Hi all,

For a course in university (Intelligent Systems -- AI, neural nets,
expert systems etc.) I and others have to write some kind of
intelligent
agent. Inspired by the "tutor" example of the course and our love for
Ruby, we decided (free choice assignment) to write a Ruby Programming
Language Tutor.

How, that's really quite a project. I'm very interested in seeing what
you come up with, so I do hope you plan to keep us posted on your
progress.

James Edward Gray II
 
B

Brian Schroeder

[...]

| (10..15).each do |i| puts i end
because it's common style to use { ... } for one-liners.

I saw a style guide that proposed using { ... } for blocks without side
effects and do ... end for blocks with side effects. This conveys more
information and I really like and use it.


If you start right now with devising exercises, I'd like to profit from
it, as I want to give a "real" ruby course beginning on the 4. Oktober. It
will be four four hour sessions and I need more exercises.

If you want to see what I have devised so far (attention, i'm not yet
proud of it) see
http://ruby.brian-schroeder.de/course/

If anybody wants to take the time to look into the slides as they are now
and correct me or point me to include other things don't heasitate.
Creting the course material is a lot more work than I thought :/

Regards,

Brian
 
P

Paul van Tilburg

How, that's really quite a project. I'm very interested in seeing what
you come up with, so I do hope you plan to keep us posted on your
progress.

Well... maybe we just do a setup... don't know if it is too ambituous.
Depends on the libraries already available I think.

Paul
[/QUOTE]
 
P

Paul van Tilburg

[...]

| (10..15).each do |i| puts i end
because it's common style to use { ... } for one-liners.

I saw a style guide that proposed using { ... } for blocks without side
effects and do ... end for blocks with side effects. This conveys more
information and I really like and use it.

Side effects as in: modifying other (instance, class, non-local) variables
instead of just returning anything?
If you start right now with devising exercises, I'd like to profit from
it, as I want to give a "real" ruby course beginning on the 4. Oktober. It
will be four four hour sessions and I need more exercises.

OK. But I think our target group is different. Since I think our tutor
can only give help to people knowing very little of progamming or OO
programming. In the other cases, our tutor could think it knows a
better solution, while the student already found a (in his/her opinion)
superior solution which the tutor doesn't agree with.
If you want to see what I have devised so far (attention, i'm not yet
proud of it) see
http://ruby.brian-schroeder.de/course/

You are not proud of it? You should be, it is very nice.
If anybody wants to take the time to look into the slides as they are now
and correct me or point me to include other things don't heasitate.
Creting the course material is a lot more work than I thought :/
Regards,

Brian
[/QUOTE]
 
Z

zuzu

Hi all,

For a course in university (Intelligent Systems -- AI, neural nets,
expert systems etc.) I and others have to write some kind of intelligent
agent. Inspired by the "tutor" example of the course and our love for
Ruby, we decided (free choice assignment) to write a Ruby Programming
Language Tutor.

how related is this to the work of allen nwwell and john anderson with
SOAR and ACT-R, respectively?
http://sitemaker.umich.edu/soar/
http://act-r.psy.cmu.edu/
http://en.wikipedia.org/wiki/Cognitive_tutor

-z
 
P

Paul van Tilburg

how related is this to the work of allen nwwell and john anderson with
SOAR and ACT-R, respectively?
http://sitemaker.umich.edu/soar/
http://act-r.psy.cmu.edu/
http://en.wikipedia.org/wiki/Cognitive_tutor

It is very related, but Lispy. :) In the course a VR agent interacting
with a student to learn him how to operate was demo'ed, very cool.
It has the same principles, just like this:
http://www.algebratutor.org/comparison.html
(nice too).

I think in our case, more heuristics are involved. We can't make a
whole generic AI system, it would take more that the 6 weeks we have.
Just to show it works for some lessons/excersizes and that it will work
in a more generic case.

I still have no ideas on how to start/build this. Well, I've decided on
Webrick, but that's about it. :) So if any of you have ideas on how to
undertake this assignment, please reply/let me know.

Paul
[/QUOTE]
 
Z

zuzu

It is very related, but Lispy. :) In the course a VR agent interacting
with a student to learn him how to operate was demo'ed, very cool.
It has the same principles, just like this:
http://www.algebratutor.org/comparison.html
(nice too).

I think in our case, more heuristics are involved. We can't make a
whole generic AI system, it would take more that the 6 weeks we have.
Just to show it works for some lessons/excersizes and that it will work
in a more generic case.

I still have no ideas on how to start/build this. Well, I've decided on
Webrick, but that's about it. :) So if any of you have ideas on how to
undertake this assignment, please reply/let me know.

have you already read:

The Atomic Components of Thought by John R. Anderson - ISBN 0805828176
&
Unified Theories of Cognition (William James Lectures) by Allen Newell
- ISBN 0674921011
?


i just started getting into this myself for a much more long-term
project. however, i have shared your idea with my research associates
and will forward all relevant feedback.

could you share your inspirational example?

i eagerly await your progress. :)
-z
 
B

Brian Schröder

Paul said:
[...]

| (10..15).each do |i| puts i end
because it's common style to use { ... } for one-liners.

I saw a style guide that proposed using { ... } for blocks without side
effects and do ... end for blocks with side effects. This conveys more
information and I really like and use it.


Side effects as in: modifying other (instance, class, non-local) variables
instead of just returning anything?

Yes. I use braces if I only use the values returned from the block,
otherwise do end. So for example .each always goes with do ... end.
OK. But I think our target group is different. Since I think our tutor
can only give help to people knowing very little of progamming or OO
programming. In the other cases, our tutor could think it knows a
better solution, while the student already found a (in his/her opinion)
superior solution which the tutor doesn't agree with.

That is certainly true. But if you come along some good exercises on the
way to developing your system, I'd certainly like to hear of them.
You are not proud of it? You should be, it is very nice.

Thank you. I am proud of the layout ;), but the content is a bit weak
and not really good structured. I'm struggling with the problem of how
to introduce a language.
You can't give meaningfull examples, unless you know already big parts
of the language. So I'm trying to solve this by calling the course
"immersive" and hope that some things can be used before they are explained.
But certainly I will have to put a lot more work into it.

regards,

Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top