An optimal approach to MRI fusion targeted prostate biopsy (PBx) remains unclear (number of cores, inter-core distance, Gleason grading (GG) principle). The aim of this study was to develop a precise pixel-wise segmentation diagnostic AI algorithm for tumor detection and GG as well as an algorithm for virtual prostate biopsy that are used together to systematically investigate and find an optimal approach to targeted PBx.Pixel-wise AI algorithms for tumor detection and GG were developed using a high-quality, manually annotated dataset (slides n=442) after fast-track annotation transfer into segmentation style. To this end, a virtual biopsy algorithm was developed that can perform random biopsies from tumor regions in whole-mount whole-slide images with pre-defined parameters. A cohort of 115 radical prostatectomy (RP) patient cases with clinically significant, MRI-visible tumors (n=121) was used for systematic studies of the optimal biopsy approach. Three expert genitourinary (GU) pathologists participated in the validation.The tumor detection algorithm (aware version sensitivity/specificity 0.99/0.90, balanced version 0.97/0.97) and GG algorithm (quadratic kappa range vs pathologists 0.77-0.78) perform on par with expert GU pathologists. In total, 65,340 virtual biopsies were performed to study different biopsy approaches with the following results: 1) four biopsy cores is the optimal number for a targeted PBx, 2) cumulative GG strategy is superior to using maximal Gleason score for single cores, 3) controlling for minimal inter-core distance does not improve the predictive accuracy for the RP Gleason score, 4) Using tertiary Gleason pattern principle (for AI tool) in cumulative GG strategy might allow better predictions of final RP Gleason score. The AI algorithm (based on cumulative GG strategy) predicted the RP Gleason score of the tumor better than 2 of the 3 expert GU pathologists.In this study, using an original approach of virtual prostate biopsy on the real cohort of patient cases, we find the optimal approach to the biopsy procedure and the subsequent Gleason grading of a targeted PBx. We publicly release two large datasets with associated expert pathologists’ GG and our virtual biopsy algorithm.