Nearly impossible, but depends upon the techniques used (the complexity of the algorithms, and which algorithms were employed).
The fields of Machine Learning (ML) and Artificial Intelligence (AI) both developed from the original field of AI, which at inception encompassed efforts to produce agents which could perform human and human-like tasks. One major area of study was how to make algorithms more efficient, such as algorithms to peform search (A* and min-max, for example), and some have described AI as a search and optimization problem. Call this branch of AI the search/optimization branch. The goal of this branch is both to perform human tasks, and perform them optimally. The related field of Machine Learning (ML) heavily leans upon statistics, and an ML-agent learns from many examples, deducing underlying patterns. ML is used for classification and prediction, and is used for many AI applications. Techniques used in ML include Decision Trees (DT), Nearest Neighbor (k-NN), Neural Networks (NN), Bayesian Inference, Reinforcement Learning (reward based feedback). The optimal/search AI techniques include search (A*, min-max, simulated annealing, etc).
But there is another branch of AI which focuses upon behaving and thinking more like a human, where the optimal solution is not the goal, but more human behavior. The techniques used by that branch rely less upon large numbers of training examples, and more about reasoning from few examples, more inductive and adductive, than deductive. Techniques used by this branch of AI include Version Spaces, Case Based Reasoning, and many others. The meta-reasoning methods used in AI can employ several different approaches, and then use meta-AI to choose the 'best' solution from competing solutions.
Anyway, there are many tools and techniques wielded by an AI-writer. Some are much more understandable to a person examining the behavior than other approaches. Consider Decision Trees, Version Spaces, and rules-based engines. These techniques are approachable and the reasoning taken to induce a model can be understood. Compare that with Neural Networks (NN), where a convolutional NN (deep learning) can 'learn' concepts in what appear to be mysterious ways.
The brief answer to your question is which techniques were used to construct the AI-agent? A reasonably complex AI-agent that includes many models and employs meta-reasoning would both be more likely to approach an Artificial General Intelligence, and be very complex, reaching decisions through reasoning which could prove impossible to understand. The complexity of the programming would be one factor, but the models constructed from the training examples could require huge amounts of space. Finding which model data decide for suffering would be akin to finding a needle in a haystack the size of Jupiter.