Reciprocal tutoring, where peers take turns to tutor each other, is an interesting style of social learning. In the Reciprocal Tutoring System (RTS), three computational cognitive tools were designed to facilitate reciprocal tutoring of Lisp programming on the network. The first is a Petal-style of code-chunk interface, with which a tutee can enter Lisp code without making syntactic errors. The second tool is Diagnosis-Hint Tree, with which a tutor can diagnose and comment on the errors in the tutee's program. The third one is a list of dialogue templates, with which the tutee and the tutor can communicate during the tutoring process. A three-phase experiment was conducted, with each phase using different cognitive tools. In addition, with the help of the cognitive tools, RTS provides a virtual learning companion that can play tutor or tutee. Evaluation results reveal both the strengths and weaknesses of peer-based learning and intelligent tutoring, with supports of different cognitive tools. Peer-based learning supported by cognitive tools is a practical and attractive alternative to intelligent tutoring systems. Exactly which type of tutor is preferred depends on the tutee's cognitive, communication, and emotional needs in the tutorial context.