In this sequel, we develop infinitesimal perturbation analysis (IPA)-based stochastic gradient algorithms for deriving optimum detectors with the average probability of bit error being the objective function that is minimized, Specifically, we develop both a class of linear as well as nonlinear (threshold) detectors, In the linear scheme, the receiver despreads the received optical signal with a sequence that minimizes the average bit-error rate, In the case of the threshold detector, the detection threshold for the photoelectron count is optimized to achieved minimum average bit-error rate, These algorithms use maximum likelihood estimates of the multiple-access interference based on observations of the photoelectron counts during each bit interval, and alleviate the disadvantage of previously proposed schemes that require explicit knowledge of the interference statistics, Computer-aided implementations of the detectors derived here are shown to outperform the correlation detector, Sequential implementations of the adaptive detectors that require no preamble are also developed, and make them very viable detectors for systems subject to temporal variations.