作者意图驱动的故事生成计算模型

0 下载量 186 浏览量 更新于2024-08-28 收藏 195KB PDF 举报
本文探讨了基于作者意图的可控故事生成模型的发展,针对当前故事生成研究中主要关注逻辑连贯性的剧情而忽视戏剧性和吸引力的问题。大多数先前的工作着重于生成没有瑕疵的叙事结构,然而,如何创造更加丰富、引人入胜的剧情是亟待解决的关键挑战。作者提出了一种创新的计算方法,将规划理论作为故事剧情生成的核心模型。 首先,作者将故事剧情视为一种可以通过规划过程来设计和组织的结构。传统上,规划被用于解决问题求解,但在故事生成中,它被用来规划情节发展的逻辑路径,确保故事的连贯性和合理性。通过规划,可以系统地构建一系列事件和决策,形成一个动态的剧情框架。 其次,引入作者意图作为剧情生成的约束条件,这是一个关键创新。作者意图反映了创作者对故事的设想,如角色发展、主题深化或冲突转折等,这些意图为模型提供了指导,使生成的故事不仅符合逻辑,而且具有作者独特的艺术风格和情感色彩。这种定制化的方法使得每个故事都能呈现出独特的故事线索和人物动机,增强了故事的吸引力。 进一步地,作者将作者意图融入到规划过程中,开发了一种可控制剧情的Graphplan算法。Graphplan是一种基于图的规划算法,它允许在复杂的图结构中搜索最优路径,同时考虑多种可能的情节走向。通过将作者意图编码为图中的节点和边,算法能够在生成故事时考虑到这些意图,并在众多可能的情节分支中选择最符合作者期望的那一部分。 实验部分展示了这种融合了作者意图的Graphplan算法在实际故事生成中的有效性。它能够生成既逻辑连贯又富有戏剧性的故事,且能根据不同的作者意图进行调整,从而满足不同读者的期待。这种作者意图驱动的生成模型为故事创作提供了一种新的可能性,使得故事生成不再局限于机械的逻辑流程,而是能够体现出深层次的人文思考和创造性。 本论文为故事生成领域带来了一个新颖的方法论,强调了作者意图在生成过程中的核心作用,推动了从逻辑完美向更具艺术性和感染力的剧情转变。这一成果对于未来的文本生成技术,特别是人工智能创作领域具有重要意义,可能促进更多创新的故事生成应用的出现。
2023-02-22 上传

Create a function pixel_flip(lst, orig_lst, budget, results, i=0) that uses recursion to generate all possible new unique images from the input orig_lst, following these rules: • The input lst is the current list being processed. Initially, this will be the same as orig_lst which is the original flattened image. • The input budget represents the number of pixels that can still be flipped. When the budget reaches 0, no more pixels can be flipped. • The input results is a list of resulting flattened images with flipped pixels. Initially, this will be an empty list. • The input i represents the index of the pixel being processed, by default set to 0, which is used to drive the recursive function towards its base case (i.e., initially starting from i=0). At termination of the function, the argument results should contain all possibilities of the input orig_lst by only flipping pixels from 0 to 1 under both the budget and the adjacency constraints. fill code at #TODO def pixel_flip(lst: list[int], orig_lst: list[int], budget: int, results: list, i: int = 0) -> None: """ Uses recursion to generate all possibilities of flipped arrays where a pixel was a 0 and there was an adjacent pixel with the value of 1. :param lst: 1D list of integers representing a flattened image . :param orig_lst: 1D list of integers representing the original flattened image. :param budget: Integer representing the number of pixels that can be flipped . :param results: List of 1D lists of integers representing all possibilities of flipped arrays, initially empty. :param i: Integer representing the index of the pixel in question. :return: None. """ #TODO def check_adjacent_for_one(flat_image: list[int], flat_pixel: int) -> bool: """ Checks if a pixel has an adjacent pixel with the value of 1. :param flat_image: 1D list of integers representing a flattened image . :param flat_pixel: Integer representing the index of the pixel in question. :return: Boolean. """ #TODO

2023-05-25 上传